From: Mariusz Mazur Date: Thu, 5 Feb 2015 08:34:21 +0000 (+0000) Subject: Use systemd-protected /tmp for tmp files X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=a542e0d012c7b291bad5745a874bf6e354729f2d;p=packages%2Fswatch.git Use systemd-protected /tmp for tmp files --- diff --git a/swatch@.service b/swatch@.service index c55b955..b9785bc 100644 --- a/swatch@.service +++ b/swatch@.service @@ -5,11 +5,12 @@ After=swatch.target [Service] Type=simple +PrivateTmp=true Environment="RC_FILE=/etc/swatch/%i.rc" "PRESTART_EXEC=/etc/swatch/%i.prestart" "POSTSTOP_EXEC=/etc/swatch/%i.poststop" EnvironmentFile=/etc/swatch/%i.conf ExecStartPre=/bin/sh -c '[ ! -e ${PRESTART_EXEC} ] && exit 0; ${PRESTART_EXEC}' ExecStopPost=/bin/sh -c '[ ! -e ${POSTSTOP_EXEC} ] && exit 0; ${POSTSTOP_EXEC}' -ExecStart=/usr/bin/swatch --config-file ${RC_FILE} $SWATCH_OPTS +ExecStart=/usr/bin/swatch --script-dir /tmp --config-file ${RC_FILE} $SWATCH_OPTS ExecReload=/bin/kill -HUP $MAINPID [Install]