1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Update remove_packages + disable_services

This commit is contained in:
billz 2023-03-28 18:43:36 +02:00
parent b64faff248
commit 454e5d7ea8

View File

@ -67,14 +67,14 @@ function _begin_install() {
function _remove_packages() { function _remove_packages() {
_install_log "Removing packages" _install_log "Removing packages"
echo -e "The following packages will be removed: ${ANSI_YELLOW}triggerhappy dphys-swapfile logrotate${ANSI_RESET}" echo -e "The following packages will be removed: ${ANSI_YELLOW}dphys-swapfile logrotate${ANSI_RESET}"
echo -n "Proceed? [Y/n]: " echo -n "Proceed? [Y/n]: "
if [ "$assume_yes" == 0 ]; then if [ "$assume_yes" == 0 ]; then
read answer < /dev/tty read answer < /dev/tty
if [ "$answer" != "${answer#[Nn]}" ]; then if [ "$answer" != "${answer#[Nn]}" ]; then
_install_status 0 "(Skipped)" _install_status 0 "(Skipped)"
else else
sudo apt-get -y remove --purge triggerhappy dphys-swapfile logrotate || _install_status 1 "Unable to remove packages" sudo apt-get -y remove --purge dphys-swapfile logrotate || _install_status 1 "Unable to remove packages"
sudo apt-get -y autoremove --purge || _install_status 1 "Unable to autoremove packages" sudo apt-get -y autoremove --purge || _install_status 1 "Unable to autoremove packages"
_install_status 0 _install_status 0
fi fi
@ -94,7 +94,6 @@ function _disable_services() {
else else
sudo systemctl unmask bootlogd.service || _install_status 2 "Service bootlogd.service does not exist" sudo systemctl unmask bootlogd.service || _install_status 2 "Service bootlogd.service does not exist"
sudo systemctl disable bootlogs || _install_status 2 "Service bootlogs does not exist" sudo systemctl disable bootlogs || _install_status 2 "Service bootlogs does not exist"
sudo systemctl disable console-setup || _install_status 2 "Service console-setup does not exist"
sudo systemctl disable apt-daily.service apt-daily.timer apt-daily-upgrade.timer apt-daily-upgrade.service || _install_status 2 "Service apt-daily does not exist" sudo systemctl disable apt-daily.service apt-daily.timer apt-daily-upgrade.timer apt-daily-upgrade.service || _install_status 2 "Service apt-daily does not exist"
_install_status 0 _install_status 0
fi fi
@ -174,7 +173,7 @@ function _install_complete() {
exit 0 exit 0
fi fi
echo "Rebooting..." echo "Rebooting..."
sudo shutdown -r now || _install_status 1 "Unable to execute shutdown" sudo reboot || _install_status 1 "Unable to execute reboot"
fi fi
} }