2021-05-04 20:14:08 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
|
|
|
source ${ABSDIR}/../functions.sh
|
|
|
|
source ${ABSDIR}/vars.sh
|
|
|
|
|
|
|
|
ensure_pwd_is_scriptdir
|
|
|
|
ensure_not_root
|
|
|
|
|
2021-05-04 20:19:01 +00:00
|
|
|
if ! systemctl --user is-active --quiet service ${service_name}; then
|
2021-05-04 20:14:08 +00:00
|
|
|
echo Service ${service_name} is already stopped.
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-05-04 20:20:22 +00:00
|
|
|
systemctl --user stop ${service_name}
|