usage message in function

This commit is contained in:
Michel Oosterhof 2016-10-30 10:06:04 +04:00
parent 321929f408
commit 88c84e89c0
1 changed files with 10 additions and 3 deletions

View File

@ -59,15 +59,18 @@ cowrie_stop () {
fi
}
cowrie_usage() {
echo "usage: $0 <start|stop>"
}
################################################################################
## Main script
################################################################################
if [ "$#" = 0 ]
then
echo "Usage: $0 <command>"
echo 'Command can be "start" or "stop"'
exit 0
cowrie_usage
exit 1
fi
find_cowrie_directory $0
@ -89,5 +92,9 @@ do
status)
cowrie_status
;;
*)
cowrie_usage
exit 1
;;
esac
done