Last active
October 31, 2024 09:45
-
-
Save brahimmachkouri/216301eb5e9b1a86d8b43f57443159f6 to your computer and use it in GitHub Desktop.
Uninstall Ajenti
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
DISTRO= | |
OS= | |
if grep 'Debian' /etc/issue > /dev/null 2>&1 ; then | |
OS=debian | |
DISTRO=debian | |
fi | |
if grep 'Ubuntu' /etc/issue > /dev/null 2>&1 ; then | |
OS=debian | |
DISTRO=ubuntu | |
fi | |
if grep 'ubuntu' /etc/os-release > /dev/null 2>&1 ; then | |
OS=debian | |
DISTRO=ubuntu | |
fi | |
echo ":: OS: $OS" | |
echo ":: Distro: $DISTRO" | |
/etc/init.d/ajenti stop | |
systemctl stop ajenti | |
echo ":: Uninstalling Ajenti" | |
/usr/bin/yes | `which pip` uninstall ajenti-panel ajenti.plugin.dashboard ajenti.plugin.settings ajenti.plugin.plugins ajenti.plugin.notepad ajenti.plugin.terminal ajenti.plugin.filemanager ajenti.plugin.packages ajenti.plugin.services || exit 1 | |
# ---------------- | |
echo ":: Uninstalling initscript" | |
if [ -f /etc/init/ajenti.conf ] ; then | |
rm /etc/init/ajenti.conf /lib/systemd/system/ajenti.service /etc/init.d/ajenti /var/run/ajenti.pid 2>/dev/null | |
rm -fr /etc/ajenti /var/log/ajenti /sys/fs/cgroup/pids/system.slice/ajenti.service /sys/fs/cgroup/devices/system.slice/ajenti.service /sys/fs/cgroup/systemd/system.slice/ajenti.service 2>/dev/null | |
fi | |
echo ':: Ajenti Uninstalled.' |
Kuss
great!!
If someone has installed using automatic installer. use below
pip uninstall ajenti-panel ajenti.plugin.dashboard ajenti.plugin.settings ajenti.plugin.plugins ajenti.plugin.notepad ajenti.plugin.terminal ajenti.plugin.filemanager ajenti.plugin.packages ajenti.plugin.services
thanks
very useful, Thanks
Star!Thx~
Really appreciate! Thanks!
<3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this!