contrib/yacy/yacy.rc

38 lines
558 B
Plaintext
Raw Normal View History

#!/bin/sh
#
# /etc/rc.d/yacy: start/stop yacy daemon
#
# User settings here
DAEMON=yacy
2008-08-01 15:11:02 +02:00
RUN_AS_USER=yacy
# end of user settings
RETVAL=0
case $1 in
start)
echo -n "Starting $DAEMON..."
2008-06-09 19:49:33 +02:00
su $RUN_AS_USER -c /usr/sbin/$DAEMON-start &> /dev/null & RETVAL=$?
echo " done."
;;
stop)
echo -n "Shutting down $DAEMON..."
2008-06-09 19:49:33 +02:00
su $RUN_AS_USER -c /usr/sbin/$DAEMON-stop &> /dev/null & RETVAL=$?
echo " done."
;;
restart)
$0 stop
sleep 20
$0 start
RETVAL=$?
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac
exit $RETVAL
# End of file