codekasten/web-splash/web-splash.sh
lars 63afdb8052 note for GPL
SPLASH_LIB setting added
2005-05-18 16:21:54 +00:00

37 lines
730 B
Bash
Executable file

#!/bin/sh
#
# this skript is GPL software (http://www.fsf.org/licensing/licenses/gpl.html)
# suggestions and questions to: devel@sumpfralle.de
# homepage: https://systemausfall.org/toolforge/web-splash
#
set -ue
. /etc/web-splash.conf
. "$SPLASH_LIB/splash-functions.inc"
ACTION="--help"
[ $# -gt 0 ] && ACTION="$1"
case "$ACTION" in
start|restart )
remove_old
init_chains
;;
stop )
remove_old
;;
register )
[ $# -gt 2 ] && echo "[WEB_SPLASH] too many parameters: only one IP address is allowed" && exit 1
[ $# -lt 2 ] && echo "[WEB_SPLASH] you have to specify an IP address" && exit 2
register_IP "$2"
;;
update )
refresh_IP_list
;;
* )
echo "Syntax: $0 {start|stop|restart}"
echo
;;
esac