Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 139315 - app-misc/joymouse new init script
Summary: app-misc/joymouse new init script
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-05 07:46 UTC by adr
Modified: 2013-01-26 19:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.