mirror of https://github.com/bol-van/zapret/
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.
34 lines
575 B
34 lines
575 B
#!/bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides: zapret
|
|
# Required-Start: $local_fs $network
|
|
# Required-Stop: $local_fs $network
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
### END INIT INFO
|
|
|
|
ZAPRET_BASE=/opt/zapret
|
|
. "$ZAPRET_BASE/init.d/sysv/functions"
|
|
|
|
NAME=zapret
|
|
DESC=anti-zapret
|
|
|
|
case "$1" in
|
|
start)
|
|
zapret_run_daemons
|
|
[ "$INIT_APPLY_FW" = "1" ] && zapret_apply_firewall
|
|
;;
|
|
|
|
stop)
|
|
zapret_stop_daemons
|
|
[ "$INIT_APPLY_FW" = "1" ] && zapret_unapply_firewall
|
|
;;
|
|
|
|
*)
|
|
N=/etc/init.d/$NAME
|
|
echo "Usage: $N {start|stop}" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|
|
|