Drafts d'oliv¶
logrotate¶
/etc/logrotate.d/irssi
/home/dl/irssi/logs/Abjects/#moviegods.log {
prerotate
/home/dl/flexget/getSeriesFromBot Abjects moviegods
endscript
rotate 0
copytruncate
size 150k
missingok
notifempty
}
systemd / systemctl¶
-
Exemple
-
Autre exemple avec plus de trucs dans "Service"
[Service] User=dl Group=dl # Run ExecStartPre with root-permissions PermissionsStartOnly=true ExecStartPre=/bin/mkdir -p /var/run/sabnzbd/ ExecStartPre=/bin/chown -R dl.dl /var/run/sabnzbd/ ExecStart=/usr/bin/python2.7 /home/dl/newsgroup/SABnzbd/SABnzbd.py --config-file /home/dl/newsgroup/SABnzbd/sabnzbd.ini --logging 2 --daemon --pid /var/run/sabnzbd/ --pidfile / var/run/sabnzbd/sabnzbd-10988.pid #ExecStart=/usr/bin/python2.7 /home/dl/newsgroup/SABnzbd/SABnzbd.py --config-file /home/dl/newsgroup/SABnzbd/sabnzbd.ini --logging 2 --daemon --pid /var/run/sabnzbd/ --pidfile / var/run/sabnzbd/sabnzbd-10987.pid PIDFile=/var/run/sabnzbd/sabnzbd-10988.pid Type=forking #TimeoutStartSec=600s -
Autre exemple pour un jar
https://superuser.com/questions/944244/running-a-java-process-from-systemd
init.d¶
Pour faire un init.d sur un jar : http://www.jcgonzalez.com/linux-java-service-wrapper-example