Changes between Version 2 and Version 3 of UserGuide/Service/DebianUbuntuInitd


Ignore:
Timestamp:
09/03/2010 10:55:16 PM (11 years ago)
Author:
daenney
Comment:

use invoke-rc.d, extend initscript with logging and logrotate

Legend:

Unmodified
Added
Removed
Modified
  • UserGuide/Service/DebianUbuntuInitd

    v2 v3  
    186186{{{ 
    187187#!sh 
    188 sudo /etc/init.d/deluge-daemon start 
    189 }}} 
     188sudo invoke-rc.d deluge-daemon start 
     189}}} 
     190 
     191== Make deluge log something == 
     192 * create a structure for deluge to log to: 
     193{{{ 
     194sudo mkdir -p /var/log/deluge/daemon 
     195sudo mkdir /var/log/deluge/web 
     196}}} 
     197 * give the user that deluge is running as (in this case deluge) write-access to the logs 
     198{{{ 
     199sudo chmod -R 755 /var/log/deluge 
     200sudo chown -R deluge /var/log/deluge 
     201}}} 
     202 * edit the init-script like so: 
     203{{{ 
     204#!sh 
     205DAEMON1=/usr/bin/deluged 
     206DAEMON1_ARGS="-d -L warning -l /var/log/deluge/daemon/warning.log"             # Consult `man deluged` for more options 
     207DAEMON2=/usr/bin/deluge-web 
     208DAEMON2_ARGS="-L warning -l /var/log/deluge/web/warning.log" 
     209}}}  
     210See [wiki:Faq#EnableDelugeLogging Logging] for possible loglevels. 
     211 * restart the daemon: {{{sudo invoke-rc.d deluge-daemon restart}}} 
     212 * tell logrotate to rotate the logs 
     213{{{ 
     214sudo cat > /etc/logrotate.d/deluge << EOF  
     215/var/log/deluge/*/*.log { 
     216        weekly 
     217        missingok 
     218        rotate 7 
     219        compress 
     220        notifempty 
     221        copytruncate 
     222        create 600 
     223} 
     224EOF