16 lines
340 B
Bash
Executable file
16 lines
340 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
|
source ${ABSDIR}/../functions.sh
|
|
source ${ABSDIR}/vars.sh
|
|
|
|
ensure_pwd_is_scriptdir
|
|
ensure_not_root
|
|
|
|
if ! systemctl --user is-active --quiet service ${service_name}; then
|
|
echo Service ${service_name} is already stopped.
|
|
exit 1
|
|
fi
|
|
|
|
systemctl --user stop ${service_name}
|