cloudflare-dns-updater/debian/postrm
Neshura b727a3714e
All checks were successful
Run Tests on Code / run-tests (push) Successful in 11s
Build and Release Binary File / test (push) Successful in 12s
Build and Release Binary File / build (push) Successful in 26s
Build and Release Binary File / upload-release (push) Successful in 11s
Fix cargo deb missing #DEBHELPER# variable
2023-12-29 01:26:09 +01:00

28 lines
1.1 KiB
Bash

#!/bin/sh
#DEBHELPER#
# Also enable User Service
# Automatically added by cargo-deb
if [ -d /run/systemd/system ]; then
USER="$(who | head -1 | awk '{print $1;}')"
runuser -l $USER -c "XDG_RUNTIME_DIR=/run/user/$(id -u $USER) systemctl --user daemon-reload >/dev/null || true"
fi
# End automatically added section
# Automatically added by cargo-deb
if [ "$1" = "remove" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
USER="$(who | head -1 | awk '{print $1;}')"
runuser -l $USER -c "XDG_RUNTIME_DIR=/run/user/$(id -u $USER) deb-systemd-helper --user mask cloudflare-dns-updater.service >/dev/null || true"
fi
fi
if [ "$1" = "purge" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
USER="$(who | head -1 | awk '{print $1;}')"
runuser -l $USER -c "XDG_RUNTIME_DIR=/run/user/$(id -u $USER) deb-systemd-helper --user purge cloudflare-dns-updater.service >/dev/null || true"
runuser -l $USER -c "XDG_RUNTIME_DIR=/run/user/$(id -u $USER) deb-systemd-helper --user unmask cloudflare-dns-updater.service >/dev/null || true"
fi
fi
# End automatically added section