I've searched some sites and also checked the syntax of the case command, but it didn't help. Where is my error?
#!/bin/sh
USER="user"
DIR="/linktodirectory"
###### script ######
case $1 in
As you can see above, i have a "in" there.
start)
su $USER -c "${DIR}/file start"
;;
stop)
su $USER -c "${DIR}/file stop"
;;
restart)
su $USER -c "${DIR}/file restart"
;;
status)
su $USER -c "${DIR}/file status"
;;
*)
echo "Usage: {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0
I'm using Ubuntu 16.04 64-bit.