mirror of
https://github.com/outbackdingo/ports.git
synced 2026-03-21 04:44:27 +00:00
34 lines
432 B
Bash
Executable File
34 lines
432 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/tor: start/stop Tor service
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
PROG=/usr/bin/tor
|
|
OPTS="--quiet"
|
|
|
|
case $1 in
|
|
start)
|
|
msg "Starting Tor service..."
|
|
start_daemon $PROG $OPTS
|
|
;;
|
|
stop)
|
|
msg "Stopping Tor service..."
|
|
stop_daemon $PROG
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
status)
|
|
status_daemon $PROG
|
|
;;
|
|
*)
|
|
echo "Usage: $0 [start|stop|restart|status]"
|
|
;;
|
|
esac
|
|
|
|
# End of file
|