[systemd-devel] Orchestrating a shutdown immediately after boot
kerrick at kerrickstaley.com
Mon Jul 8 00:08:29 PDT 2013
I'd like my system to:
2. run a command
3. shut down
I've implemented step 2 in a .service file , but I can't figure out how
to automatically shut the system down once it's finished. shutdown.target
conflicts with all services that don't set DefaultDependencies=false (which
is most of them), so it seems I'm out of luck—there is no way to specify a
target that requires both multi-user.target and shutdown.target. Is there
some way to handle this situation?
N.B. This is all running in an LXC; the overarching goal is to sandbox the
command so it can't affect the rest of the system.
 If it's useful, the .service file is as follows:
Description=Sandboxed Checkerbox command
ExecStart=/bin/sh -c '/home/user/cmd </home/user/stdin >/home/user/stdout
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the systemd-devel