2016-08-26 21:04:49 +02:00
|
|
|
[Unit]
|
2016-08-30 16:27:21 +02:00
|
|
|
Description={$fullname}
|
2016-08-26 21:04:49 +02:00
|
|
|
After=syslog.target network.target {$database}
|
|
|
|
|
Requires={$database}
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
2016-08-30 16:27:21 +02:00
|
|
|
PIDFile=/run/{$shortname}.pid
|
|
|
|
|
WorkingDirectory={$scriptfolder}
|
2016-08-26 21:04:49 +02:00
|
|
|
StandardOutput=null
|
|
|
|
|
StandardError=syslog
|
2016-08-30 16:27:21 +02:00
|
|
|
ExecStart=/usr/bin/php {$scriptpath}
|
|
|
|
|
ExecStop=/bin/kill $MAINPID
|
2016-08-26 21:04:49 +02:00
|
|
|
PrivateTmp=true
|
2016-08-30 16:27:21 +02:00
|
|
|
InaccessibleDirectories=/home /root /boot /opt /mnt /media
|
|
|
|
|
ReadOnlyDirectories=/etc /usr
|
|
|
|
|
|
|
|
|
|
;Permissions
|
|
|
|
|
User=root
|
|
|
|
|
Group=daemon
|
|
|
|
|
|
|
|
|
|
;Limits
|
|
|
|
|
LimitCORE=1
|
2016-08-26 21:04:49 +02:00
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|