Added uninstall.sh

This commit is contained in:
2026-04-30 21:04:55 -05:00
parent db7ab37fc4
commit aba2f2bc81

18
uninstall.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
# install.sh / uninstall.sh — Custom MOTD installer
# Symlink or rename this file; behaviour switches on the script name.
set -euo pipefail
TARGET="/etc/profile.d/motd.sh"
MOTD_D="/etc/update-motd.d"
if [[ $EUID -ne 0 ]]; then
echo "Error: run as root (sudo $0)" >&2
exit 1
fi
echo "Removing $TARGET..."
rm -f "$TARGET"
echo "Re-enabling default MOTD scripts..."
chmod +x "$MOTD_D"/*
echo "Done."