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]



On Fri, Jul 27, 2012 at 10:52 PM, David Benfell
<benfell@xxxxxxxxxxxxxxxxx> wrote:
> 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
> ExecStart=$JAVA_HOME/bin/java -jar $JAVA_OPTS start.jar $JETTY_OPTS >>
> /var/log/jetty.log 2>&1
> ExecStop=kill `pidof -o %PPID /usr/sbin/dictd` 2>/dev/null 1>/dev/null
>
> Basically lots of things that would be normal in a shell are
> problematic.

Yup, Exec* does not accept shell syntax, but does accept some variable
substitution (see systemd.service(5) for details).

> So I need to create separate scripts to start and stop
> some daemons. I'm thinking I definitely do not want to use /etc/rc.d
> for this (I had to back out and go back to init and /etc/rc.d is still
> in use for that).
>
> Is there some consensus on where such scripts should go?

Not really, as far as I know. However, it seems that it is common to
put "helper scripts" that are shipped with systemd in
/usr/lib/systemd/ and those shipped with udev in /usr/lib/udev/, so
for user-created helper scripts, I think I'd put them in
/etc/systemd/.

-t


[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