Systemd Service Capstone: Make a Broken Unit Start and Survive a Reboot
ExpertRHCSA Prep40-60 minA custom systemd service won't start and won't come up on boot — it's broken in five independent ways. Repair the unit so it validates, runs, is fully wired, and persists across reboots. See /root/brief.txt; grading inspects unit state and runs systemd-analyze verify (it does not start the service).
1. Drop-in override — the drop-in isn't taking effect the way it reads. Find out why systemd-analyze verify is unhappy with it, and fix it.
2. Wrong `ExecStart` — it names a program that isn't there, so the service has nothing to launch. Point it at the real exec script that ships with the app.
3. Still won't launch — even with ExecStart corrected, systemd can't launch that script as a program. Work out what about the file itself stops it, and fix that.
4. Missing `EnvironmentFile` — the unit declares an env file it depends on, but that file is absent. Provide it.
5. Not wired for boot — the service would run only on demand. Make it survive a reboot, not just start now.
Also: the drop-in's User= names an account that doesn't exist on this host, so the unit won't resolve. Point it at a real service account.
- Make a unit and its drop-in pass systemd-analyze verify (no unknown keys, valid User)
- Correct ExecStart and the executable bit so the service can actually run
- Provide the required EnvironmentFile the unit depends on
- Enable the service so it starts on boot, not just on demand
- Distinguish 'starts now' from 'survives a reboot' — the enable step people skip
Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.
