Skip to content

Commit

Permalink
Trick systemd into accepting multiline script in ExecPreStart. Hopefu…
Browse files Browse the repository at this point in the history
…lly.
  • Loading branch information
Shnatsel committed May 22, 2015
1 parent 65f95fa commit a0068d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contrib/systemd/cjdns.service
Expand Up @@ -7,10 +7,10 @@ After=network.target
Type=simple
ProtectHome=true
ProtectSystem=true
ExecPreStart=/bin/sh -ec "if ! test -e /etc/cjdroute.conf; then
umask 077 # to create the file with 600 permissions without races
/usr/bin/cjdroute --genconf > /etc/cjdroute.conf
echo 'WARNING: A new /etc/cjdroute.conf file has been generated.'
ExecPreStart=/bin/sh -ec "if ! test -e /etc/cjdroute.conf; \
then umask 077; \
/usr/bin/cjdroute --genconf > /etc/cjdroute.conf; \
echo 'WARNING: A new /etc/cjdroute.conf file has been generated.'; \
fi"
ExecStart=/bin/sh -c "cjdroute --nobg < /etc/cjdroute.conf"
Restart=always
Expand Down

0 comments on commit a0068d2

Please sign in to comment.