9 lines
362 B
Bash
9 lines
362 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
if command -v systemctl >/dev/null 2>&1 && systemctl list-unit-files | grep -q '^shd-alice.service'; then
|
|
systemctl restart shd-alice.service || sudo systemctl restart shd-alice.service || true
|
|
else
|
|
"$(cd "$(dirname "$0")" && pwd)/stop.sh"
|
|
nohup "$(cd "$(dirname "$0")" && pwd)/start.sh" >/tmp/shd-alice.log 2>&1 &
|
|
fi
|