mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2024-12-01 01:49:09 +08:00
25 lines
665 B
Bash
25 lines
665 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
SERVICE=rustdesk-hbbr.service
|
|
|
|
case "$1" in
|
|
configure|abort-upgrade|abort-deconfigure|abort-remove)
|
|
mkdir -p /var/lib/rustdesk-server/
|
|
deb-systemd-helper unmask "${SERVICE}" >/dev/null || true
|
|
if deb-systemd-helper --quiet was-enabled "${SERVICE}"; then
|
|
deb-systemd-invoke enable "${SERVICE}" >/dev/null || true
|
|
else
|
|
deb-systemd-invoke update-state "${SERVICE}" >/dev/null || true
|
|
fi
|
|
systemctl --system daemon-reload >/dev/null || true
|
|
if [ -n "$2" ]; then
|
|
deb-systemd-invoke restart "${SERVICE}" >/dev/null || true
|
|
else
|
|
deb-systemd-invoke start "${SERVICE}" >/dev/null || true
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
exit 0
|