#!/bin/bash . /etc/rc.conf . /etc/rc.d/functions SYNDAEMON_ARGS="-d" [ -f /etc/conf.d/syndaemon ] && . /etc/conf.d/syndaemon PID=`pidof -o %PPID /usr/bin/syndaemon` case "$1" in start) stat_busy "Starting Synaptics Daemon" [ -z "$PID" ] && /usr/bin/syndaemon ${SYNDAEMON_ARGS} if [ $? -gt 0 ]; then stat_fail else echo $PID > /var/run/syndaemon.pid add_daemon syndaemon stat_done fi ;; stop) stat_busy "Stopping Synaptics Daemon" [ ! -z "$PID" ] && kill $PID &> /dev/null if [ $? -gt 0 ]; then stat_fail else rm /var/run/syndaemon.pid rm_daemon syndaemon stat_done fi ;; restart) $0 stop sleep 1 $0 start ;; *) echo "usage: $0 {start|stop|restart}" esac exit 0