Re: In the systemd scheme, where should startup/stop scripts for things systemd can't handle go?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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=


--
дамјан


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux