Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Uninstall Ajenti
#!/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.'
@ohkeenan

This comment has been minimized.

Copy link

@ohkeenan ohkeenan commented Jul 6, 2018

Thanks for this!

@RealPwned

This comment has been minimized.

Copy link

@RealPwned RealPwned commented Mar 9, 2019

Kuss

@maoyuching

This comment has been minimized.

Copy link

@maoyuching maoyuching commented Mar 23, 2019

great!!

@Rajan4436

This comment has been minimized.

Copy link

@Rajan4436 Rajan4436 commented Jan 26, 2020

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

@Slyai

This comment has been minimized.

Copy link

@Slyai Slyai commented Mar 21, 2021

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment