rustdesk-server-hbbs.postinst 739 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. set -e
  3. SERVICE=rustdesk-hbbs.service
  4. if [ "$1" = "configure" ]; then
  5. mkdir -p /var/log/rustdesk-server
  6. fi
  7. case "$1" in
  8. configure|abort-upgrade|abort-deconfigure|abort-remove)
  9. mkdir -p /var/lib/rustdesk-server/
  10. deb-systemd-helper unmask "${SERVICE}" >/dev/null || true
  11. if deb-systemd-helper --quiet was-enabled "${SERVICE}"; then
  12. deb-systemd-invoke enable "${SERVICE}" >/dev/null || true
  13. else
  14. deb-systemd-invoke update-state "${SERVICE}" >/dev/null || true
  15. fi
  16. systemctl --system daemon-reload >/dev/null || true
  17. if [ -n "$2" ]; then
  18. deb-systemd-invoke restart "${SERVICE}" >/dev/null || true
  19. else
  20. deb-systemd-invoke start "${SERVICE}" >/dev/null || true
  21. fi
  22. ;;
  23. esac
  24. exit 0