nano-run/bundle/debian/preremove.sh
Alexander Baryshnikov 4edfaa4d26 initial code added
2020-09-10 18:11:34 +08:00

15 lines
309 B
Bash
Executable File

#!/bin/sh
SERVICE="nano-run"
RUNNING_USER="${SERVICE}"
systemctl stop "${SERVICE}".service || echo "failed to stop service"
systemctl disable "${SERVICE}".service || echo "failed to disable service"
if id -u ${RUNNING_USER}; then
echo "Removing user ${RUNNING_USER}..."
userdel -r ${RUNNING_USER}
fi