20 lines
360 B
Bash
Executable File
20 lines
360 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
usage() {
|
|
echo \
|
|
"Help Menu
|
|
Usage: $(basename "${0}") <server id>"
|
|
exit "${1}"
|
|
}
|
|
|
|
|
|
[[ -z "${1}" ]] && usage 1
|
|
[[ "${1}" == "--help" || "${1}" == "-h" ]] && usage 0
|
|
|
|
tmux send-keys -t "Squad-Server-${1}" "C-c" ENTER > /dev/null 2>&1 \
|
|
&& echo "Stopped Squad-Server-${1}" \
|
|
|| echo "Could not find Squad-Server-${1}"
|
|
|
|
exit ${?} |