The init script /etc/init.d/peercast does not work correctly, because it calls the shell script wrapper /usr/sbin/peercast which executes /usr/libexec/peercast in foreground. I patched /etc/init.d/peercast as following. --- peercast.orig 2006-05-17 22:32:08.000000000 +0900 +++ peercast 2006-05-17 22:28:39.000000000 +0900 @@ -12,7 +12,11 @@ start-stop-daemon --start --chuid nobody \ --pidfile /var/run/peercast.pid --background \ - --exec /usr/sbin/peercast + --exec /usr/libexec/peercast --make-pidfile -- \ + -P /usr/share/peercast \ + -i /usr/share/peercast/peercast.ini \ + -l /var/log/peercast.log + eend $? } @@ -20,7 +24,7 @@ stop() { ebegin "Stopping peercast" - start-stop-daemon --stop --retry 20 --pidfile /var/run/peercast.pid + start-stop-daemon --stop --pidfile /var/run/peercast.pid eend $? } Furthermore, I have to do chmod nobody:nobody /usr/share/peercast/peercast.ini in order to run peercast as nobody.
Please attach as plain text, do not inline.
Hi, i dont know if this patch is good but isnt it better to modify the wrapper to not returns after running peercast ?
Looks like the init script executes peercast as nobody. The peercast.ini file can not be written to the /usr/shar/usr/share/peercaste/peercast directory. Either A) change the directory perms on /usr/share/peercast to allow nobody to write to this dir --- or --- B) Create peercast user and change script to use that user, also change the /usr/share/peercast dierctory to allow that user to write (peercast.ini) C) specify ini file on peercast command line (default is $HOME/peercast) - or create user and Home dir for peercast D) Specify Peercast parameters -i <inifile> -l <logfile> ini file could be /etc/peercast/ log file could be /var/log/peercast.log
should be fixed with -r2, thanks for reporting