22 lines
346 B
Bash
Executable File
22 lines
346 B
Bash
Executable File
#!/bin/sh
|
|
|
|
usage() {
|
|
printf "\nUsage: ${0} start|restart|stop\n\n"
|
|
}
|
|
|
|
if [ "${#}" -ne 1 ] ; then
|
|
printf "\nError: less or more then one command are given.\n"
|
|
usage
|
|
exit
|
|
fi
|
|
|
|
if ! [[ "${1}" =~ start|restart|stop ]] ; then
|
|
printf "\nError: only start, restart or stop are allowed.\n"
|
|
usage
|
|
exit
|
|
fi
|
|
|
|
thin "${1}" -C cnf/thin.yml
|
|
|
|
exit 0
|