Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
529 B

#!/bin/bash
PIDFILE=/var/run/tor/tor.pid
case "$1" in
start)
/usr/bin/tor
;;
stop)
if [ -f $PIDFILE ]; then
kill -15 $(< $PIDFILE)
fi
;;
reload)
if [ -f $PIDFILE ]; then
kill -1 $(< $PIDFILE)
fi
;;
status)
if [ -f $PIDFILE ] && kill -0 $(< $PIDFILE) ; then
echo "Tor is running."
else
echo "Tor is not running."
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
;;
esac