27 lines
328 B
Bash
27 lines
328 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -eu
|
||
|
|
||
|
# parse config file
|
||
|
. /etc/cryptobox/cryptobox.conf
|
||
|
|
||
|
ACTION=help
|
||
|
[ $# -gt 0 ] && ACTION="$1"
|
||
|
|
||
|
case "$ACTION" in
|
||
|
start )
|
||
|
$CB_SCRIPT network-up
|
||
|
;;
|
||
|
stop )
|
||
|
$CB_SCRIPT network-down
|
||
|
;;
|
||
|
restart )
|
||
|
$0 stop
|
||
|
$0 start
|
||
|
;;
|
||
|
* )
|
||
|
echo "Syntax: `basename $0` { start | stop | restart }"
|
||
|
echo
|
||
|
;;
|
||
|
esac
|