mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
parent
7c3c9a671c
commit
e7fc8dd4f2
@ -49,7 +49,7 @@ else
|
||||
rm -f "/home/$UNIXUSER/.google_authenticator"
|
||||
if is_this_installed libpam-google-authenticator
|
||||
then
|
||||
apt purge libpam-google-authenticator -y
|
||||
apt-get purge libpam-google-authenticator -y
|
||||
apt-get autoremove -y
|
||||
fi
|
||||
# Show successful uninstall if applicable
|
||||
|
||||
@ -33,7 +33,7 @@ else
|
||||
# Ask for removal or reinstallation
|
||||
reinstall_remove_menu "$SCRIPT_NAME"
|
||||
# Removal
|
||||
apt purge libapache2-mod-evasive -y
|
||||
apt-get purge libapache2-mod-evasive -y
|
||||
rm -rf /var/log/apache2/evasive
|
||||
rm -f "$ENVASIVE"
|
||||
a2dismod reqtimeout
|
||||
@ -47,7 +47,7 @@ fi
|
||||
|
||||
# Protect against DDOS
|
||||
apt-get update -q4 & spinner_loading
|
||||
apt -y install libapache2-mod-evasive
|
||||
install_if_not libapache2-mod-evasive
|
||||
mkdir -p /var/log/apache2/evasive
|
||||
chown -R www-data:root /var/log/apache2/evasive
|
||||
if [ ! -f "$ENVASIVE" ]
|
||||
@ -65,7 +65,7 @@ ENVASIVE
|
||||
fi
|
||||
|
||||
# Protect against Slowloris
|
||||
#apt -y install libapache2-mod-qos
|
||||
#install_if_not libapache2-mod-qos
|
||||
a2enmod reqtimeout # http://httpd.apache.org/docs/2.4/mod/mod_reqtimeout.html
|
||||
|
||||
cat << SPAMHAUS_ENABLE > "$SCRIPTS/spamhaus_cronjob.sh"
|
||||
|
||||
@ -28,9 +28,9 @@ else
|
||||
# Ask for removal or reinstallation
|
||||
reinstall_remove_menu "$SCRIPT_NAME"
|
||||
# Removal
|
||||
apt purge clamav-daemon -y
|
||||
apt purge clamav-freshclam -y
|
||||
apt purge clamav -y
|
||||
apt-get purge clamav-daemon -y
|
||||
apt-get purge clamav-freshclam -y
|
||||
apt-get purge clamav -y
|
||||
apt-get autoremove -y
|
||||
rm -f /etc/systemd/system/clamav-daemon.service
|
||||
rm -f "$SCRIPTS"/clamav-fullscan.sh
|
||||
|
||||
@ -32,7 +32,7 @@ else
|
||||
do
|
||||
if is_this_installed "$packet"
|
||||
then
|
||||
apt purge "$packet" -y
|
||||
apt-get purge "$packet" -y
|
||||
fi
|
||||
done
|
||||
apt-get autoremove -y
|
||||
|
||||
@ -38,7 +38,7 @@ else
|
||||
then
|
||||
print_text_in_color "$ICyan" "Unbanning all currently blocked IPs..."
|
||||
fail2ban-client unban --all
|
||||
apt purge fail2ban -y
|
||||
apt-get purge fail2ban -y
|
||||
rm -rf /etc/fail2ban
|
||||
crontab -u root -l | grep -v "$SCRIPTS/daily_fail2ban_report.sh" | crontab -u root -
|
||||
rm -rf "$SCRIPTS/daily_fail2ban_report.sh"
|
||||
|
||||
@ -30,7 +30,7 @@ else
|
||||
# Ask for removal or reinstallation
|
||||
reinstall_remove_menu "$SCRIPT_NAME"
|
||||
# Removal
|
||||
apt purge mc -y
|
||||
apt-get purge mc -y
|
||||
apt-get autoremove -y
|
||||
# Show successful uninstall if applicable
|
||||
removal_popup "$SCRIPT_NAME"
|
||||
|
||||
@ -53,12 +53,12 @@ else
|
||||
do
|
||||
if is_this_installed "$app"
|
||||
then
|
||||
apt purge "$app" -y
|
||||
apt-get purge "$app" -y
|
||||
fi
|
||||
done
|
||||
if is_this_installed ffmpeg && ! is_app_installed integration_whiteboard
|
||||
then
|
||||
apt purge ffmpeg -y
|
||||
apt-get purge ffmpeg -y
|
||||
fi
|
||||
apt-get autoremove -y
|
||||
if yesno_box_no "Do you want to remove all previews that were generated until now?
|
||||
|
||||
@ -57,7 +57,7 @@ else
|
||||
do
|
||||
if is_this_installed "$app"
|
||||
then
|
||||
apt purge "$app" -y
|
||||
apt-get purge "$app" -y
|
||||
fi
|
||||
done
|
||||
apt-get autoremove -y
|
||||
|
||||
@ -38,12 +38,12 @@ else
|
||||
do
|
||||
if is_this_installed "$packet"
|
||||
then
|
||||
apt purge "$packet" -y
|
||||
apt-get purge "$packet" -y
|
||||
fi
|
||||
done
|
||||
if is_this_installed ffmpeg && ! nextcloud_occ config:system:get enabledPreviewProviders | grep -q "Movie"
|
||||
then
|
||||
apt purge ffmpeg -y
|
||||
apt-get purge ffmpeg -y
|
||||
fi
|
||||
apt-get autoremove -y
|
||||
# Show successful uninstall if applicable
|
||||
|
||||
@ -29,7 +29,7 @@ else
|
||||
reinstall_remove_menu "$SCRIPT_NAME"
|
||||
# Removal
|
||||
rm -f "$SCRIPTS/smart-notification.sh"
|
||||
check_command apt purge smartmontools -y
|
||||
check_command apt-get purge smartmontools -y
|
||||
apt-get autoremove -y
|
||||
rm -f /etc/smartd.conf
|
||||
# reset the cronjob
|
||||
@ -99,7 +99,7 @@ then
|
||||
msg_box "It seems like not even one drive supports smart monitoring.
|
||||
This is completely normal if you run this script in a VM since virtual drives don't support smart monitoring.
|
||||
We will uninstall smart monitoring now since you won't get any helpful notification out of this going forward."
|
||||
apt purge smartmontools -y
|
||||
apt-get purge smartmontools -y
|
||||
apt-get autoremove -y
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -30,10 +30,10 @@ else
|
||||
# Ask for removal or reinstallation
|
||||
reinstall_remove_menu "$SCRIPT_NAME"
|
||||
# Removal
|
||||
apt purge ddclient -y
|
||||
apt-get purge ddclient -y
|
||||
if is_this_installed libjson-any-perl
|
||||
then
|
||||
apt purge libjson-any-perl -y
|
||||
apt-get purge libjson-any-perl -y
|
||||
fi
|
||||
apt-get autoremove -y
|
||||
rm -f /etc/ddclient.conf
|
||||
|
||||
@ -35,7 +35,7 @@ else
|
||||
if is_this_installed libapache2-mod-geoip
|
||||
then
|
||||
a2dismod geoip
|
||||
apt purge libapache2-mod-geoip -y
|
||||
apt-get purge libapache2-mod-geoip -y
|
||||
fi
|
||||
apt-get autoremove -y
|
||||
sed -i "/^#Geoip-block-start/,/^#Geoip-block-end/d" /etc/apache2/apache2.conf
|
||||
|
||||
@ -218,7 +218,7 @@ stop_if_installed mariadb-server
|
||||
# We don't want automatic updates since they might fail (we use our own script)
|
||||
if is_this_installed unattended-upgrades
|
||||
then
|
||||
apt purge unattended-upgrades -y
|
||||
apt-get purge unattended-upgrades -y
|
||||
apt-get autoremove -y
|
||||
rm -rf /var/log/unattended-upgrades
|
||||
fi
|
||||
|
||||
@ -249,7 +249,7 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive ; apt dist-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
|
||||
export DEBIAN_FRONTEND=noninteractive ; apt-get dist-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
|
||||
|
||||
# Update Netdata
|
||||
if [ -d /etc/netdata ]
|
||||
@ -276,7 +276,7 @@ then
|
||||
if ! snap list certbot >/dev/null 2>&1
|
||||
then
|
||||
print_text_in_color "$ICyan" "Reinstalling certbot (Let's Encrypt) as a snap instead..."
|
||||
apt remove certbot -y
|
||||
apt-get remove certbot -y
|
||||
apt-get autoremove -y
|
||||
install_if_not snapd
|
||||
snap install core
|
||||
|
||||
@ -71,7 +71,7 @@ then
|
||||
msg_box "No drive found within 60 seconds.
|
||||
Please run this script again if you want to try again."
|
||||
msg_box "We will now remove dislocker so that you keep a clean system."
|
||||
apt purge dislocker -y
|
||||
apt-get purge dislocker -y
|
||||
apt-get autoremove -y
|
||||
exit
|
||||
fi
|
||||
@ -88,7 +88,7 @@ If you want to cancel, type 'exit' and press [ENTER].")
|
||||
if [ "$PASSWORD" = "exit" ]
|
||||
then
|
||||
msg_box "We will now remove dislocker so that you keep a clean system."
|
||||
apt purge dislocker -y
|
||||
apt-get purge dislocker -y
|
||||
apt-get autoremove -y
|
||||
exit 1
|
||||
fi
|
||||
@ -119,7 +119,7 @@ If you want to cancel, type 'exit' and press [ENTER].")
|
||||
umount /media/bitlocker/1
|
||||
sed -i '/fuse.dislocker/d' /etc/fstab
|
||||
msg_box "We will now remove dislocker so that you keep a clean system."
|
||||
apt purge dislocker -y
|
||||
apt-get purge dislocker -y
|
||||
apt-get autoremove -y
|
||||
exit 1
|
||||
elif echo "$MOUNT_PATH" | grep -q " "
|
||||
|
||||
@ -118,13 +118,13 @@ Please report this to $ISSUES"
|
||||
# Remove all initially installed applications
|
||||
for program in "${INSTALLED[@]}"
|
||||
do
|
||||
apt purge "$program" -y
|
||||
apt-get purge "$program" -y
|
||||
done
|
||||
|
||||
# Remove unbound
|
||||
if is_this_installed unbound
|
||||
then
|
||||
apt purge unbound -y
|
||||
apt-get purge unbound -y
|
||||
fi
|
||||
|
||||
# Remove not needed dependencies
|
||||
|
||||
@ -26,7 +26,7 @@ then
|
||||
|
||||
If you want to delete PLEX Media Server and it's data to be able \
|
||||
to start from scratch, run the following two commands:
|
||||
'sudo apt purge plexmediaserver'
|
||||
'sudo apt-get purge plexmediaserver'
|
||||
'sudo deluser plex'
|
||||
|
||||
Attention! This will delete the user-data:
|
||||
|
||||
@ -216,10 +216,10 @@ install_remove_packet() {
|
||||
if is_this_installed "$1"
|
||||
then
|
||||
print_text_in_color "$ICyan" "Uninstalling $2"
|
||||
apt purge "$1" -y
|
||||
apt-get purge "$1" -y
|
||||
if [ "$1" = "grsync" ]
|
||||
then
|
||||
apt purge gnome-themes-extra -y
|
||||
apt-get purge gnome-themes-extra -y
|
||||
fi
|
||||
apt-get autoremove -y
|
||||
if [ "$1" = "nautilus" ]
|
||||
@ -267,7 +267,7 @@ picard sound-juicer vlc acpid gnome-shell-extension-dash-to-panel gnome-shell-ex
|
||||
do
|
||||
if is_this_installed "$app"
|
||||
then
|
||||
apt purge "$app" -y
|
||||
apt-get purge "$app" -y
|
||||
fi
|
||||
done
|
||||
apt-get autoremove -y
|
||||
@ -301,8 +301,8 @@ picard sound-juicer vlc acpid gnome-shell-extension-dash-to-panel gnome-shell-ex
|
||||
if is_this_installed makemkv-oss || is_this_installed makemkv-bin
|
||||
then
|
||||
print_text_in_color "$ICyan" "Uninstalling $SUBTITLE"
|
||||
apt purge makemkv-oss -y
|
||||
apt purge makemkv-bin -y
|
||||
apt-get purge makemkv-oss -y
|
||||
apt-get purge makemkv-bin -y
|
||||
apt-get autoremove -y
|
||||
add-apt-repository --remove ppa:heyarje/makemkv-beta -y
|
||||
apt-get update -q4 & spinner_loading
|
||||
@ -333,7 +333,7 @@ We will need to add a 3rd party repository to install it which can set your serv
|
||||
if is_this_installed onlyoffice-desktopeditors
|
||||
then
|
||||
print_text_in_color "$ICyan" "Uninstalling $SUBTITLE"
|
||||
apt purge onlyoffice-desktopeditors -y
|
||||
apt-get purge onlyoffice-desktopeditors -y
|
||||
apt-get autoremove -y
|
||||
rm -f /etc/apt/sources.list.d/onlyoffice-desktopeditors.list
|
||||
apt-get update -q4 & spinner_loading
|
||||
|
||||
@ -80,7 +80,7 @@ if ! echo "$PASSWORD" | clevis luks bind -k - -d "/dev/${ENCRYPTED_DEVICE[*]}" t
|
||||
then
|
||||
msg_box "Something has failed while trying to configure clevis luks.
|
||||
We will now uninstall all needed packets again, so that you are able to start over."
|
||||
apt purge clevis-tpm2 clevis-luks clevis-initramfs -y
|
||||
apt-get purge clevis-tpm2 clevis-luks clevis-initramfs -y
|
||||
apt-get autoremove -y
|
||||
msg_box "All installed packets were successfully removed."
|
||||
exit 1
|
||||
|
||||
@ -149,7 +149,7 @@ rm -Rf /var/cache/apt/archives/aufs*
|
||||
# Upgrade docker to latest version
|
||||
rm -Rf /var/lib/docker
|
||||
apt-get update -q4 & spinner_loading
|
||||
apt upgrade docker-ce -y
|
||||
apt-get upgrade docker-ce -y
|
||||
|
||||
# Load docker images back
|
||||
print_text_in_color "$ICyan" "Importing saved docker images to overlay2..."
|
||||
|
||||
Loading…
Reference in New Issue
Block a user