diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2012-12-31 09:52:43 +0000 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2012-12-31 09:52:43 +0000 |
commit | 6bd35273d5df78ada4559fc3a1d7c89f0f86a9de (patch) | |
tree | 1197a889cb416d4b05067fa548d8905d5b745bbe /media-sound/murmur/files | |
parent | Remove myself as a maintainer from luadbi. (diff) | |
download | gentoo-2-6bd35273d5df78ada4559fc3a1d7c89f0f86a9de.tar.gz gentoo-2-6bd35273d5df78ada4559fc3a1d7c89f0f86a9de.tar.bz2 gentoo-2-6bd35273d5df78ada4559fc3a1d7c89f0f86a9de.zip |
Added rewritten init script so running murmurd won't be seen as crashed by openrc anymore. Removed pidfile variable from conf.d file
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 0x981CA6FC)
Diffstat (limited to 'media-sound/murmur/files')
-rw-r--r-- | media-sound/murmur/files/murmur.confd | 3 | ||||
-rw-r--r-- | media-sound/murmur/files/murmur.initd | 25 |
2 files changed, 9 insertions, 19 deletions
diff --git a/media-sound/murmur/files/murmur.confd b/media-sound/murmur/files/murmur.confd index 4e8c0cead76f..36367c51136b 100644 --- a/media-sound/murmur/files/murmur.confd +++ b/media-sound/murmur/files/murmur.confd @@ -1,9 +1,6 @@ # where to look for the config file MURMUR_CONF=/etc/murmur/murmur.ini -# where to look for the pid file -MURMUR_PID=/var/run/murmur/murmur.pid - # run as this user MURMUR_USER=murmur diff --git a/media-sound/murmur/files/murmur.initd b/media-sound/murmur/files/murmur.initd index f7c2ddd6480f..5b8c3b9938f5 100644 --- a/media-sound/murmur/files/murmur.initd +++ b/media-sound/murmur/files/murmur.initd @@ -1,5 +1,9 @@ #!/sbin/runscript +pidfile="/var/run/murmur/murmur.pid" +command="/usr/bin/murmurd" +command_args="-ini \"${MURMUR_CONF}\"" +start_stop_daemon_args="-u \"${MURMUR_USER}\" --env HOME=\"${MURMUR_HOME}\" --wait 20" extra_started_commands="reload" depend() { @@ -8,29 +12,18 @@ depend() { after bootmisc mysql } -start() { - ebegin "Starting Murmur" - start-stop-daemon --start --pidfile "${MURMUR_PID}" \ - --user "${MURMUR_USER}" --env HOME="${MURMUR_HOME}" \ - --exec /usr/bin/murmurd -- -ini "${MURMUR_CONF}" - eend $? -} - -stop() { - ebegin "Stopping Murmur" - start-stop-daemon --stop --pidfile "${MURMUR_PID}" \ - --exec /usr/bin/murmurd - eend $? +start_pre() { + checkpath -d -o ${MURMUR_USER} ${pidfile%/*} } reload() { - if [ ! -f "${MURMUR_PID}" ]; then + if [ ! -f "${pidfile}" ]; then eerror "Murmur is not running" return 1 fi ebegin "Reloading Murmur" - start-stop-daemon --signal HUP --pidfile "${MURMUR_PID}" \ - --exec /usr/bin/murmurd + start-stop-daemon --signal HUP --pidfile "${pidfile}" \ + --exec ${command} eend $? } |