Good working init script + conf for the ebuild! --- /etc/conf.d/joymouse --- JOYMOUSE_OPTS="" PIDFILE="/var/run/joymouse.pid" --- --- /etc/init.d/joymouse --- #!/sbin/runscript depend() { need modules } start() { ebegin "Starting joymouse" start-stop-daemon --start --quiet -m --pidfile ${PIDFILE} \ --background --startas /usr/bin/joymouse -x /usr/bin/joymouse -- \ ${JOYMOUSE_OPTS} eend $? } stop() { ebegin "Stopping joymouse" start-stop-daemon --stop --quiet --pidfile ${PIDFILE} eend $? } ---
--- /etc/init.d/joymouse --- +# NB: Config is in /etc/conf.d/joymouse + +# Provide a default location if they haven't in /etc/conf.d/joymouse +PIDFILE=${PIDFILE:-/var/run/joymouse.pid} ---
no need to use --background as joymouse already has a '-d' option also, making PIDFILE configurable is pointless imo
might be useful to patch the joymouse package so that it has a --pidfile option, then we wouldnt need ssd at all
(In reply to comment #2) > also, making PIDFILE configurable is pointless imo I think you're right. It can't be started as a different user.