Last active
April 11, 2022 09:38
-
-
Save sulincix/1aeeb6ff99ea14e1ff76afc301b25785 to your computer and use it in GitHub Desktop.
debian remove systemd
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 [[ $UID -ne 0 ]] ; then | |
echo "You must be root" | |
exit 1 | |
fi | |
apt update | |
# Block service invoke | |
echo -e "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d | |
chmod +x /usr/sbin/policy-rc.d | |
# Remove systemd preremove script. | |
rm -f /var/lib/dpkg/info/systemd.prerm | |
# Install sysv-init and elogind | |
apt install elogind sysvinit-core sysv-rc -y --allow-remove-essential | |
apt install -f | |
apt full-upgrade -y | |
apt autoremove -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment