Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 139315

Summary: app-misc/joymouse new init script
Product: Gentoo Linux Reporter: adr <adr>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED OBSOLETE    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description adr 2006-07-05 07:46:11 UTC
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 $?
}
---
Comment 1 adr 2006-07-07 00:52:37 UTC
--- /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}
---
Comment 2 SpanKY gentoo-dev 2006-07-08 08:54:17 UTC
no need to use --background as joymouse already has a '-d' option

also, making PIDFILE configurable is pointless imo
Comment 3 SpanKY gentoo-dev 2006-07-08 08:54:50 UTC
might be useful to patch the joymouse package so that it has a --pidfile option, then we wouldnt need ssd at all
Comment 4 adr 2006-07-08 09:04:25 UTC
(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.