| Summary: | app-misc/joymouse new init script | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | adr <adr> |
| Component: | [OLD] Games | Assignee: | Gentoo Games <games> |
| Status: | RESOLVED OBSOLETE | ||
| Severity: | enhancement | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
--- /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. |
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 $? } ---