Add full Oculog codebase
This commit is contained in:
26
clients/ubuntu/debian/postrm
Executable file
26
clients/ubuntu/debian/postrm
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Post-removal script
|
||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
||||
# Stop and disable service
|
||||
systemctl stop oculog-client.service 2>/dev/null || true
|
||||
systemctl disable oculog-client.service 2>/dev/null || true
|
||||
|
||||
# Remove service file
|
||||
rm -f /etc/systemd/system/oculog-client.service
|
||||
systemctl daemon-reload
|
||||
|
||||
# Remove symlink
|
||||
rm -f /usr/local/bin/oculog-client
|
||||
|
||||
if [ "$1" = "purge" ]; then
|
||||
# Remove configuration and logs (optional - commented out to preserve data)
|
||||
# rm -rf /etc/oculog
|
||||
# rm -rf /var/log/oculog
|
||||
# rm -rf /opt/oculog
|
||||
echo "Configuration and logs preserved at /etc/oculog and /var/log/oculog"
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user