peach-package-builder/conf/templates/go_sbot/DEBIAN/postrm

21 lines
700 B
Plaintext
Executable File

# Automatically added by cargo-deb
if [ -d /run/systemd/system ]; then
# USER="$(who | head -1 | awk '{print $1;}')"
USER="peach"
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
deb-systemd-helper --user mask service >/dev/null || true
fi
fi
if [ "$1" = "purge" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper --user purge service >/dev/null || true
deb-systemd-helper --user unmask service >/dev/null || true
fi
fi
# End automatically added section