Show usage if unknown command is used

This commit is contained in:
Paul-Christian Volkmer 2023-01-30 19:19:48 +01:00
parent e62a72bc3b
commit ff6d28d5a2

View File

@ -76,7 +76,7 @@ case "$1" in
echo "help Show this help message" echo "help Show this help message"
echo echo
;; ;;
*) ''|'start')
if [ ! -f "/etc/wireguard/$DEVICE.conf" ]; then if [ ! -f "/etc/wireguard/$DEVICE.conf" ]; then
cd /etc/wireguard cd /etc/wireguard
/scripts/create-config.sh /scripts/create-config.sh
@ -91,4 +91,11 @@ case "$1" in
echo "done!" echo "done!"
tail -f "${WG_LOG_FILE}" tail -f "${WG_LOG_FILE}"
;; ;;
*)
echo "Usage: docker-compose run wg {ls|add|rm|show|init|purge|help}"
echo " or: docker-compose run wg start"
echo " docker-compose up [-d]"
echo " to start services"
exit 1
;;
esac esac