17 lines
352 B
Bash
Executable File
17 lines
352 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
|
# shellcheck disable=SC1091
|
|
source "$SCRIPT_DIR/common.sh"
|
|
|
|
if has_systemd_unit; then
|
|
systemctl restart "$SYSTEMD_SERVICE_NAME"
|
|
systemctl is-active "$SYSTEMD_SERVICE_NAME"
|
|
exit 0
|
|
fi
|
|
|
|
"$SCRIPT_DIR/stop.sh" || true
|
|
sleep 1
|
|
exec "$SCRIPT_DIR/start.sh"
|