[arch-general] In the systemd scheme, where should startup/stop scripts for things systemd can't handle go?
Damjan
gdamjan at gmail.com
Fri Jul 27 17:24:20 EDT 2012
> So now that I've got a network through systemd, I ran into trouble
> with some daemon service files that I crafted by hand.
>
> None of the following directives will work (culled from different files):
>
> ExecStartPre=cd /etc/solr
Use:
WorkingDirectory=
> ExecStart=$JAVA_HOME/bin/java -jar $JAVA_OPTS start.jar $JETTY_OPTS >>
> /var/log/jetty.log 2>&1
You shouldn't redirect stdout/stderr, let systemd handle it
see StandardInput=, StandardOutput=, StandardError= in man systemd.exec
> ExecStop=kill `pidof -o %PPID /usr/sbin/dictd` 2>/dev/null 1>/dev/null
I don't know what's that "kill dictd" but if it's a subprocess started
from your java program, systemd can handle it too. It puts every service
in its own CGroup so it know all the processes started from that
service. See man systemd.kill KillMode=
--
дамјан
More information about the arch-general
mailing list