Write a proper systemd service
A service starts but never restarts on crash, runs as root, and won't come back after a reboot. Write a unit file that restarts on failure, runs as a non-root user, and starts at boot.
Scenario
myapp.service starts the app, but it's missing the basics: if the app crashes it stays down, it runs
as root, and after a reboot it never comes back (no [Install]). Turn it into a proper unit.
Your job
Edit myapp.service so it:
- has an
ExecStart(keep the existing one), - restarts on failure (
Restart=on-failure), - runs as a non-root
User, and - can be enabled at boot (an
[Install]section withWantedBy=multi-user.target).
How it's graded
Structural check on the unit file (we read the directives; we don't start the service).
Teaches: writing correct systemd units: restart policy, least-privilege user, and boot enablement.
What gets checked
Your solution is verified against each of these:
- The [Service] section has an ExecStart
- The service restarts on failure
- The service runs as a non-root User
- The unit can be enabled at boot ([Install] WantedBy)
Solve it in your browser
No setup, no install. Write your solution in the editor and hit Check. The in-house engine renders and grades it instantly, then issues your proof the moment every check passes.
Solve in browser →Prefer your own lab?
- Build the fix locally. New to the tooling? See setting up your lab.
- Push your topology file, device configs, and any playbooks to a public repo (GitHub or GitLab).
- Submit the repo link. We review it by hand, confirm it works, and issue your proof page.