#!/sbin/runscript # Copyright 2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 DESCRIPTION="Udisks-Glue Automounter" PIDFILE="/var/run/udisks-glue.pid" CFGFILE="/etc/udisks-glue.conf" LOGFILE="/var/log/udisks-glue.log" depend() { need dbus after dbus } start() { ebegin "Starting ${DESCRIPTION}" mkdir -p "$(dirname ${PIDFILE})" echo "$(date): Starting ${DESCRIPTION}..." >> ${LOGFILE} 2>&1 /usr/bin/udisks-glue --config ${CFGFILE} --foreground >> ${LOGFILE} 2>&1 & # echo $(pidof /usr/bin/udisks-glue) > ${PIDFILE} eend $? } stop() { ebegin "Stopping ${DESCRIPTION}" echo "$(date): Stopping ${DESCRIPTION}..." >> ${LOGFILE} 2>&1 echo "" >> ${LOGFILE} 2>&1 killall -9 /usr/bin/udisks-glue # start-stop-daemon --stop --quiet --pidfile ${PIDFILE} eend $? }