diff --git a/addons/harden-ssh.sh b/addons/harden-ssh.sh index 163b9076..1c42dcf6 100644 --- a/addons/harden-ssh.sh +++ b/addons/harden-ssh.sh @@ -50,7 +50,7 @@ else if is_this_installed libpam-google-authenticator then apt purge libpam-google-authenticator -y - apt autoremove -y + apt-get autoremove -y fi # Show successful uninstall if applicable removal_popup "$SCRIPT_NAME" diff --git a/addons/locate_mirror.sh b/addons/locate_mirror.sh index ca5491f1..8822b3db 100644 --- a/addons/locate_mirror.sh +++ b/addons/locate_mirror.sh @@ -13,7 +13,7 @@ root_check # Use another method if the new one doesn't work if [ -z "$REPO" ] then - REPO=$(apt update -q4 && apt-cache policy | grep http | tail -1 | awk '{print $2}') + REPO=$(apt-get update -q4 && apt-cache policy | grep http | tail -1 | awk '{print $2}') fi # Check where the best mirrors are and update diff --git a/addons/redis-server-ubuntu.sh b/addons/redis-server-ubuntu.sh index f181b702..b46d79a1 100644 --- a/addons/redis-server-ubuntu.sh +++ b/addons/redis-server-ubuntu.sh @@ -106,8 +106,8 @@ redis-cli SHUTDOWN chown redis:root /etc/redis/redis.conf chmod 600 /etc/redis/redis.conf -apt update -q4 & spinner_loading -apt autoremove -y -apt autoclean +apt-get update -q4 & spinner_loading +apt-get autoremove -y +apt-get autoclean exit diff --git a/addons/security.sh b/addons/security.sh index 2d79fd67..8e79a61e 100644 --- a/addons/security.sh +++ b/addons/security.sh @@ -46,7 +46,7 @@ else fi # Protect against DDOS -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading apt -y install libapache2-mod-evasive mkdir -p /var/log/apache2/evasive chown -R www-data:root /var/log/apache2/evasive diff --git a/addons/smtp-mail.sh b/addons/smtp-mail.sh index 8abfc362..d9aecd01 100644 --- a/addons/smtp-mail.sh +++ b/addons/smtp-mail.sh @@ -31,7 +31,7 @@ else apt-get purge msmtp -y apt-get purge msmtp-mta -y apt-get purge mailutils -y - apt autoremove -y + apt-get autoremove -y rm -f /etc/mail.rc rm -f /etc/msmtprc rm -f /var/log/msmtp diff --git a/apps/adminer.sh b/apps/adminer.sh index 8088e798..cc0c3da1 100644 --- a/apps/adminer.sh +++ b/apps/adminer.sh @@ -49,7 +49,7 @@ a2enmod rewrite a2enmod ssl # Install Adminer -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading install_if_not adminer curl_to_dir "http://www.adminer.org" "latest.php" "$ADMINERDIR" curl_to_dir "https://raw.githubusercontent.com/Niyko/Hydra-Dark-Theme-for-Adminer/master" "adminer.css" "$ADMINERDIR" diff --git a/apps/clamav.sh b/apps/clamav.sh index df65da14..77add42f 100644 --- a/apps/clamav.sh +++ b/apps/clamav.sh @@ -31,7 +31,7 @@ else apt purge clamav-daemon -y apt purge clamav-freshclam -y apt purge clamav -y - apt autoremove -y + apt-get autoremove -y rm -f /etc/systemd/system/clamav-daemon.service rm -f "$SCRIPTS"/clamav-fullscan.sh rm -f "$VMLOGS"/clamav-fullscan.log @@ -51,8 +51,8 @@ ram_check 3 "ClamAV" cpu_check 2 "ClamAV" # Install needed tools -apt update -q4 & spinner_loading -apt install clamav clamav-freshclam clamav-daemon -y +apt-get update -q4 & spinner_loading +apt-get install clamav clamav-freshclam clamav-daemon -y # stop freshclam and update the database check_command systemctl stop clamav-freshclam diff --git a/apps/collabora_docker.sh b/apps/collabora_docker.sh index 4d4c9b6b..1632d46d 100644 --- a/apps/collabora_docker.sh +++ b/apps/collabora_docker.sh @@ -189,7 +189,7 @@ then fi # Get the latest packages -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading # Check if Nextcloud is installed print_text_in_color "$ICyan" "Checking if Nextcloud is installed..." diff --git a/apps/extract.sh b/apps/extract.sh index 05756fc1..ee322ab4 100644 --- a/apps/extract.sh +++ b/apps/extract.sh @@ -35,7 +35,7 @@ else apt purge "$packet" -y fi done - apt autoremove -y + apt-get autoremove -y # Show successful uninstall if applicable removal_popup "$SCRIPT_NAME" fi diff --git a/apps/face-recognition.sh b/apps/face-recognition.sh index c2dd65c5..90984fa5 100644 --- a/apps/face-recognition.sh +++ b/apps/face-recognition.sh @@ -52,8 +52,8 @@ else then apt-get purge php7.4-pdlib -y rm -f /etc/apt/sources.list.d/20-pdlib.list - apt update -q4 & spinner_loading - apt autoremove -y + apt-get update -q4 & spinner_loading + apt-get autoremove -y rm -f /etc/apt/trusted.gpg.d/facerecognititon.gpg fi crontab -u www-data -l | grep -v "face_background_job.log" | crontab -u www-data - @@ -94,7 +94,7 @@ curl_to_dir https://repo.delellis.com.ar "repo.gpg.key" "$SCRIPTS" check_command apt-key --keyring /etc/apt/trusted.gpg.d/facerecognititon.gpg add "$SCRIPTS/repo.gpg.key" rm -f "$SCRIPTS/repo.gpg.key" echo "deb https://repo.delellis.com.ar focal focal" > /etc/apt/sources.list.d/20-pdlib.list -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading install_if_not php7.4-pdlib # Install the app diff --git a/apps/fail2ban.sh b/apps/fail2ban.sh index 6c966ee6..58fb6207 100644 --- a/apps/fail2ban.sh +++ b/apps/fail2ban.sh @@ -122,7 +122,7 @@ FINDTIME_=1800 # failed attempts before banning an IP MAXRETRY_=20 -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading install_if_not fail2ban -y check_command update-rc.d fail2ban disable diff --git a/apps/midnight-commander.sh b/apps/midnight-commander.sh index 5004018d..d51ef7d1 100644 --- a/apps/midnight-commander.sh +++ b/apps/midnight-commander.sh @@ -31,7 +31,7 @@ else reinstall_remove_menu "$SCRIPT_NAME" # Removal apt purge mc -y - apt autoremove -y + apt-get autoremove -y # Show successful uninstall if applicable removal_popup "$SCRIPT_NAME" fi diff --git a/apps/netdata.sh b/apps/netdata.sh index 04f7a749..3f1dcbc8 100644 --- a/apps/netdata.sh +++ b/apps/netdata.sh @@ -67,7 +67,7 @@ fi # Install is_process_running dpkg is_process_running apt -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading curl_to_dir https://my-netdata.io kickstart.sh $SCRIPTS sudo -u "$UNIXUSER" bash $SCRIPTS/kickstart.sh all --dont-wait --no-updates --stable-channel rm -f $SCRIPTS/kickstart.sh diff --git a/apps/onlyoffice_docker.sh b/apps/onlyoffice_docker.sh index cdb2846e..0d9e4d4f 100644 --- a/apps/onlyoffice_docker.sh +++ b/apps/onlyoffice_docker.sh @@ -196,7 +196,7 @@ then fi # Get the latest packages -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading # Check if Nextcloud is installed print_text_in_color "$ICyan" "Checking if Nextcloud is installed..." diff --git a/apps/pico_cms.sh b/apps/pico_cms.sh index b5800872..3dc8f95a 100644 --- a/apps/pico_cms.sh +++ b/apps/pico_cms.sh @@ -221,7 +221,7 @@ then fi # Get the latest packages -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading # Check if $SUBDOMAIN exists and is reachable print_text_in_color "$ICyan" "Checking if $SUBDOMAIN exists and is reachable..." diff --git a/apps/previewgenerator.sh b/apps/previewgenerator.sh index 9505cc81..9d0720cc 100644 --- a/apps/previewgenerator.sh +++ b/apps/previewgenerator.sh @@ -60,7 +60,7 @@ else then apt purge ffmpeg -y fi - apt autoremove -y + apt-get autoremove -y if yesno_box_no "Do you want to remove all previews that were generated until now? This will most likely clear a lot of space but your server will need to re-generate the previews \ if you should opt to re-enable previews again." diff --git a/apps/talk.sh b/apps/talk.sh index 44721c92..eb9f745b 100644 --- a/apps/talk.sh +++ b/apps/talk.sh @@ -60,7 +60,7 @@ else apt purge "$app" -y fi done - apt autoremove -y + apt-get autoremove -y # Show successful uninstall if applicable removal_popup "$SCRIPT_NAME" fi @@ -246,7 +246,7 @@ echo "listen: 127.0.0.1:4222" > /etc/nats/nats.conf ## Installation curl -sL -o "/etc/apt/trusted.gpg.d/morph027-nats-server.asc" "https://packaging.gitlab.io/nats-server/gpg.key" echo "deb https://packaging.gitlab.io/nats-server nats main" > /etc/apt/sources.list.d/morph027-nats-server.list -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading install_if_not nats-server chown nats:nats /etc/nats/nats.conf start_if_stopped nats-server @@ -259,7 +259,7 @@ check_command systemctl enable nats-server source /etc/lsb-release curl -sL -o "/etc/apt/trusted.gpg.d/morph027-janus.asc" "https://packaging.gitlab.io/janus/gpg.key" echo "deb https://packaging.gitlab.io/janus/$DISTRIB_CODENAME $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/morph027-janus.list -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading install_if_not janus ## Configuration sed -i "s|#turn_rest_api_key\s*=.*|$JANUS_API_KEY|" /etc/janus/janus.jcfg @@ -273,7 +273,7 @@ check_command systemctl enable janus ## Installation curl -sL -o "/etc/apt/trusted.gpg.d/morph027-nextcloud-spreed-signaling.asc" "https://packaging.gitlab.io/nextcloud-spreed-signaling/gpg.key" echo "deb https://packaging.gitlab.io/nextcloud-spreed-signaling signaling main" > /etc/apt/sources.list.d/morph027-nextcloud-spreed-signaling.list -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading install_if_not nextcloud-spreed-signaling ## Configuration if [ ! -f "$SIGNALING_SERVER_CONF" ]; diff --git a/apps/webmin.sh b/apps/webmin.sh index 17075849..728a57f7 100644 --- a/apps/webmin.sh +++ b/apps/webmin.sh @@ -32,7 +32,7 @@ else reinstall_remove_menu "$SCRIPT_NAME" # Removal check_command apt-get purge webmin -y - apt autoremove -y + apt-get autoremove -y rm -f /etc/apt/sources.list.d/webmin.list rm -f /etc/apt/trusted.gpg.d/webmin.gpg # Show successful uninstall if applicable @@ -55,7 +55,7 @@ curl_to_dir http://www.webmin.com "jcameron-key.asc" "$SCRIPTS" check_command apt-key --keyring /etc/apt/trusted.gpg.d/webmin.gpg add "$SCRIPTS/jcameron-key.asc" rm -f "$SCRIPTS/jcameron-key.asc" echo "deb https://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading install_if_not webmin print_text_in_color "$ICyan" "Configuring Webmin..." diff --git a/apps/whiteboard.sh b/apps/whiteboard.sh index c60fc59f..03de430e 100644 --- a/apps/whiteboard.sh +++ b/apps/whiteboard.sh @@ -45,7 +45,7 @@ else then apt purge ffmpeg -y fi - apt autoremove -y + apt-get autoremove -y # Show successful uninstall if applicable removal_popup "$SCRIPT_NAME" fi diff --git a/disk/smart-monitoring.sh b/disk/smart-monitoring.sh index e05b928a..64521364 100644 --- a/disk/smart-monitoring.sh +++ b/disk/smart-monitoring.sh @@ -30,7 +30,7 @@ else # Removal rm -f "$SCRIPTS/smart-notification.sh" check_command apt purge smartmontools -y - apt autoremove -y + apt-get autoremove -y rm -f /etc/smartd.conf # reset the cronjob crontab -u root -l | grep -v 'smartctl.sh' | crontab -u root - @@ -100,7 +100,7 @@ then 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 autoremove -y + apt-get autoremove -y exit 1 fi diff --git a/lib.sh b/lib.sh index 49c74550..d70a495b 100644 --- a/lib.sh +++ b/lib.sh @@ -677,12 +677,12 @@ fi # Install dnsutils if not existing if ! dpkg-query -W -f='${Status}' "dnsutils" | grep -q "ok installed" then - apt update -q4 & spinner_loading && apt install dnsutils -y + apt-get update -q4 & spinner_loading && apt-get install dnsutils -y fi # Install net-tools if not existing if ! dpkg-query -W -f='${Status}' "net-tools" | grep -q "ok installed" then - apt update -q4 & spinner_loading && apt install net-tools -y + apt-get update -q4 & spinner_loading && apt-get install net-tools -y fi # After applying Netplan settings, try a DNS lookup. # Restart systemd-networkd if this fails and try again. @@ -905,7 +905,7 @@ cleanup_open_port() { if [ -n "$FAIL" ] then apt-get purge miniupnpc -y - apt autoremove -y + apt-get autoremove -y fi } @@ -1034,7 +1034,7 @@ fi install_if_not() { if ! dpkg-query -W -f='${Status}' "${1}" | grep -q "ok installed" then - apt update -q4 & spinner_loading && RUNLEVEL=1 apt install "${1}" -y + apt-get update -q4 & spinner_loading && RUNLEVEL=1 apt-get install "${1}" -y fi } @@ -1509,7 +1509,7 @@ then is_process_running dpkg is_process_running apt print_text_in_color "$ICyan" "Installing Docker CE..." - apt update -q4 & spinner_loading + apt-get update -q4 & spinner_loading install_if_not curl curl -fsSL get.docker.com | sh fi diff --git a/network/ddclient-configuration.sh b/network/ddclient-configuration.sh index dc3f5d11..23129119 100644 --- a/network/ddclient-configuration.sh +++ b/network/ddclient-configuration.sh @@ -35,15 +35,15 @@ else then apt purge libjson-any-perl -y fi - apt autoremove -y + apt-get autoremove -y rm -f /etc/ddclient.conf # Show successful uninstall if applicable removal_popup "$SCRIPT_NAME" fi # install needed tool -apt update -q4 & spinner_loading -DEBIAN_FRONTEND=noninteractive apt install ddclient -y +apt-get update -q4 & spinner_loading +DEBIAN_FRONTEND=noninteractive apt-get install ddclient -y # Test if file exists if [ ! -f /etc/ddclient.conf ] diff --git a/network/geoblock.sh b/network/geoblock.sh index 067a3c0a..60aaecb5 100644 --- a/network/geoblock.sh +++ b/network/geoblock.sh @@ -37,7 +37,7 @@ else a2dismod geoip apt purge libapache2-mod-geoip -y fi - apt autoremove -y + apt-get autoremove -y sed -i "/^#Geoip-block-start/,/^#Geoip-block-end/d" /etc/apache2/apache2.conf check_command systemctl restart apache2 # Show successful uninstall if applicable diff --git a/nextcloud-startup-script.sh b/nextcloud-startup-script.sh index 673b697b..ed7fd1f4 100644 --- a/nextcloud-startup-script.sh +++ b/nextcloud-startup-script.sh @@ -541,15 +541,15 @@ print_text_in_color "$ICyan" "System will now upgrade..." bash $SCRIPTS/update.sh minor # Cleanup 2 -apt autoremove -y -apt autoclean +apt-get autoremove -y +apt-get autoclean # Set trusted domain in config.php run_script NETWORK trusted # Remove preference for IPv4 rm -f /etc/apt/apt.conf.d/99force-ipv4 -apt update +apt-get update # Success! msg_box "The installation process is *almost* done. diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh index bb5160be..06153654 100644 --- a/nextcloud_install_production.sh +++ b/nextcloud_install_production.sh @@ -5,13 +5,25 @@ # Prefer IPv4 for apt echo 'Acquire::ForceIPv4 "true";' >> /etc/apt/apt.conf.d/99force-ipv4 +# Fix fancy progress bar for apt-get +# https://askubuntu.com/a/754653 +if [ -d /etc/apt/apt.conf.d ] +then + if ! [ -f /etc/apt/apt.conf.d/99progressbar ] + then + echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar + echo 'APT::Color "1";' >> /etc/apt/apt.conf.d/99progressbar + chmod 644 /etc/apt/apt.conf.d/99progressbar + fi +fi + # Install curl if not existing if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed")" == "1" ] then echo "curl OK" else - apt update -q4 - apt install curl -y + apt-get update -q4 + apt-get install curl -y fi true @@ -78,8 +90,8 @@ if [ "$(dpkg-query -W -f='${Status}' "lshw" 2>/dev/null | grep -c "ok installed" then print_text_in_color "$IGreen" "lshw OK" else - apt update -q4 & spinner_loading - apt install lshw -y + apt-get update -q4 & spinner_loading + apt-get install lshw -y fi # Install net-tools if not existing @@ -87,8 +99,8 @@ if [ "$(dpkg-query -W -f='${Status}' "net-tools" 2>/dev/null | grep -c "ok insta then print_text_in_color "$IGreen" "net-tools OK" else - apt update -q4 & spinner_loading - apt install net-tools -y + apt-get update -q4 & spinner_loading + apt-get install net-tools -y fi # Install whiptail if not existing @@ -96,8 +108,8 @@ if [ "$(dpkg-query -W -f='${Status}' "whiptail" 2>/dev/null | grep -c "ok instal then print_text_in_color "$IGreen" "whiptail OK" else - apt update -q4 & spinner_loading - apt install whiptail -y + apt-get update -q4 & spinner_loading + apt-get install whiptail -y fi true @@ -207,7 +219,7 @@ stop_if_installed mariadb-server if is_this_installed unattended-upgrades then apt purge unattended-upgrades -y - apt autoremove -y + apt-get autoremove -y rm -rf /var/log/unattended-upgrades fi @@ -331,8 +343,8 @@ done # Install PostgreSQL # sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" # curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - -apt update -q4 & spinner_loading -apt install postgresql -y +apt-get update -q4 & spinner_loading +apt-get install postgresql -y # Create DB cd /tmp @@ -344,7 +356,7 @@ print_text_in_color "$ICyan" "PostgreSQL password: $PGDB_PASS" systemctl restart postgresql.service # Install Apache -check_command apt install apache2 -y +check_command apt-get install apache2 -y a2enmod rewrite \ headers \ proxy \ @@ -373,8 +385,8 @@ echo "ServerTokens Prod" fi # Install PHP "$PHPVER" -apt update -q4 & spinner_loading -check_command apt install -y \ +apt-get update -q4 & spinner_loading +check_command apt-get install -y \ php"$PHPVER"-fpm \ php"$PHPVER"-intl \ php"$PHPVER"-ldap \ @@ -903,8 +915,8 @@ case "$choice" in esac # Cleanup -apt autoremove -y -apt autoclean +apt-get autoremove -y +apt-get autoclean find /root "/home/$UNIXUSER" -type f \( -name '*.sh*' -o -name '*.html*' -o -name '*.tar*' -o -name '*.zip*' \) -delete # Install virtual kernels for Hyper-V, (and extra for UTF8 kernel module + Collabora and OnlyOffice) @@ -914,7 +926,7 @@ then if [ "$SYSVENDOR" == "Microsoft Corporation" ] then # Hyper-V - apt install -y --install-recommends \ + apt-get install -y --install-recommends \ linux-virtual \ linux-image-virtual \ linux-tools-virtual \ diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 10e455a2..3dba696b 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -108,7 +108,7 @@ It should then start working again." start_if_stopped docker fi -# Check if /boot is filled more than 90% and exit the script if that's +# Check if /boot is filled more than 90% and exit the script if that's # the case since we don't want to end up with a broken system if [ -d /boot ] then @@ -128,12 +128,24 @@ rm -f /root/php-upgrade.sh rm -f /tmp/php-upgrade.sh rm -f /root/db-migration.sh +# Fix fancy progress bar for apt-get +# https://askubuntu.com/a/754653 +if [ -d /etc/apt/apt.conf.d ] +then + if ! [ -f /etc/apt/apt.conf.d/99progressbar ] + then + echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar + echo 'APT::Color "1";' >> /etc/apt/apt.conf.d/99progressbar + chmod 644 /etc/apt/apt.conf.d/99progressbar + fi +fi + # Ubuntu 16.04 is deprecated check_distro_version # Hold PHP if Ondrejs PPA is used print_text_in_color "$ICyan" "Fetching latest packages with apt..." -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading if apt-cache policy | grep "ondrej" >/dev/null 2>&1 then print_text_in_color "$ICyan" "Ondrejs PPA is installed. \ @@ -265,7 +277,7 @@ then then print_text_in_color "$ICyan" "Reinstalling certbot (Let's Encrypt) as a snap instead..." apt remove certbot -y - apt autoremove -y + apt-get autoremove -y install_if_not snapd snap install core snap install certbot --classic @@ -473,8 +485,8 @@ we have removed Watchtower from this server. Updates will now happen for each co fi # Cleanup un-used packages -apt autoremove -y -apt autoclean +apt-get autoremove -y +apt-get autoclean # Update GRUB, just in case update-grub diff --git a/not-supported/bitlocker-mount.sh b/not-supported/bitlocker-mount.sh index 42ec90b5..75c2c0e2 100644 --- a/not-supported/bitlocker-mount.sh +++ b/not-supported/bitlocker-mount.sh @@ -72,7 +72,7 @@ then 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 autoremove -y + apt-get autoremove -y exit fi @@ -89,7 +89,7 @@ If you want to cancel, type 'exit' and press [ENTER].") then msg_box "We will now remove dislocker so that you keep a clean system." apt purge dislocker -y - apt autoremove -y + apt-get autoremove -y exit 1 fi mkdir -p /media/bitlocker/1 @@ -120,7 +120,7 @@ If you want to cancel, type 'exit' and press [ENTER].") 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 autoremove -y + apt-get autoremove -y exit 1 elif echo "$MOUNT_PATH" | grep -q " " then diff --git a/not-supported/firewall.sh b/not-supported/firewall.sh index c6e7133f..89d76038 100644 --- a/not-supported/firewall.sh +++ b/not-supported/firewall.sh @@ -36,7 +36,7 @@ fi # Install and enable firewall if ! is_this_installed ufw then - DEBIAN_FRONTEND=noninteractive apt install ufw -y --no-install-recommends + DEBIAN_FRONTEND=noninteractive apt-get install ufw -y --no-install-recommends systemctl enable ufw &>/dev/null systemctl start ufw &>/dev/null fi diff --git a/not-supported/pi-hole.sh b/not-supported/pi-hole.sh index 404a0e9f..6a04cb16 100644 --- a/not-supported/pi-hole.sh +++ b/not-supported/pi-hole.sh @@ -128,7 +128,7 @@ Please report this to $ISSUES" fi # Remove not needed dependencies - apt autoremove -y + apt-get autoremove -y # Delete other files rm -f /var/www/html/index.lighttpd.orig diff --git a/not-supported/remotedesktop.sh b/not-supported/remotedesktop.sh index ef0aad54..95e3188a 100644 --- a/not-supported/remotedesktop.sh +++ b/not-supported/remotedesktop.sh @@ -43,8 +43,8 @@ If you have already installed a desktop environment, you will not need to instal then # Install gnome-session print_text_in_color "$ICyan" "Installing gnome-session..." - apt update -q4 & spinner_loading - apt install gnome-session --no-install-recommends -y + apt-get update -q4 & spinner_loading + apt-get install gnome-session --no-install-recommends -y sudo -u "$UNIXUSER" dbus-launch gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close" install_if_not gnome-shell-extension-dash-to-panel check_command sudo -u "$UNIXUSER" dbus-launch gnome-extensions enable dash-to-panel@jderose9.github.com @@ -221,7 +221,7 @@ install_remove_packet() { then apt purge gnome-themes-extra -y fi - apt autoremove -y + apt-get autoremove -y if [ "$1" = "nautilus" ] then rm -f /home/"$UNIXUSER"/.local/share/applications/org.gnome.Nautilus.desktop @@ -270,10 +270,10 @@ picard sound-juicer vlc acpid gnome-shell-extension-dash-to-panel gnome-shell-ex apt purge "$app" -y fi done - apt autoremove -y + apt-get autoremove -y systemctl set-default multi-user add-apt-repository --remove ppa:heyarje/makemkv-beta -y - apt update -q4 & spinner_loading + apt-get update -q4 & spinner_loading rm -f /etc/polkit-1/localauthority/50-local.d/46-allow-update-repo.pkla rm -f /etc/polkit-1/localauthority/50-local.d/allow-update-repo.pkla rm -f /etc/polkit-1/localauthority/50-local.d/color.pkla @@ -303,9 +303,9 @@ picard sound-juicer vlc acpid gnome-shell-extension-dash-to-panel gnome-shell-ex print_text_in_color "$ICyan" "Uninstalling $SUBTITLE" apt purge makemkv-oss -y apt purge makemkv-bin -y - apt autoremove -y + apt-get autoremove -y add-apt-repository --remove ppa:heyarje/makemkv-beta -y - apt update -q4 & spinner_loading + apt-get update -q4 & spinner_loading print_text_in_color "$ICyan" "$SUBTITLE was successfully uninstalled." else msg_box "MakeMKV is not open source. This is their official website: makemkv.com @@ -315,8 +315,8 @@ We will need to add a 3rd party repository to install it which can set your serv print_text_in_color "$ICyan" "Installing $SUBTITLE" if add-apt-repository ppa:heyarje/makemkv-beta -y then - apt update -q4 & spinner_loading - apt install makemkv-oss makemkv-bin -y + apt-get update -q4 & spinner_loading + apt-get install makemkv-oss makemkv-bin -y print_text_in_color "$ICyan" "$SUBTITLE was successfully installed" else msg_box "Something failed while trying to add the new repository" "$SUBTITLE" @@ -334,9 +334,9 @@ We will need to add a 3rd party repository to install it which can set your serv then print_text_in_color "$ICyan" "Uninstalling $SUBTITLE" apt purge onlyoffice-desktopeditors -y - apt autoremove -y + apt-get autoremove -y rm -f /etc/apt/sources.list.d/onlyoffice-desktopeditors.list - apt update -q4 & spinner_loading + apt-get update -q4 & spinner_loading print_text_in_color "$ICyan" "$SUBTITLE was successfully uninstalled." else msg_box "OnlyOffice Desktop Editors are open source but not existing in the Ubuntu repositories. @@ -349,7 +349,7 @@ This can set your server under risk, though!" "$SUBTITLE" apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 echo "deb https://download.onlyoffice.com/repo/debian squeeze main" \ > /etc/apt/sources.list.d/onlyoffice-desktopeditors.list - apt update -q4 & spinner_loading + apt-get update -q4 & spinner_loading install_if_not onlyoffice-desktopeditors print_text_in_color "$ICyan" "$SUBTITLE was successfully installed" fi diff --git a/not-supported/restore-backup.sh b/not-supported/restore-backup.sh index 872cb345..de307c73 100644 --- a/not-supported/restore-backup.sh +++ b/not-supported/restore-backup.sh @@ -550,8 +550,8 @@ if [ -f "$SYSTEM_DIR/$SCRIPTS/veracrypt-automount.sh" ] then print_text_in_color "$ICyan" "Installing veracrypt... This can take a long time!" add-apt-repository ppa:unit193/encryption -y - apt update -q4 & spinner_loading - apt install veracrypt --no-install-recommends -y + apt-get update -q4 & spinner_loading + apt-get install veracrypt --no-install-recommends -y # No need to copy the file since it is already synced via rsync # Create startup service cat << SERVICE > /etc/systemd/system/veracrypt-automount.service @@ -582,7 +582,7 @@ then adduser --no-create-home --quiet --disabled-login --force-badname --gecos "" "$user" &>/dev/null usermod --append --groups smb-users,www-data "$user" done - DEBIAN_FRONTEND=noninteractive apt install samba -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" + DEBIAN_FRONTEND=noninteractive apt-get install samba -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" # No need to sync files since they are already synced via rsync fi diff --git a/not-supported/tpm2-unlock.sh b/not-supported/tpm2-unlock.sh index c83c4a8e..a374d336 100644 --- a/not-supported/tpm2-unlock.sh +++ b/not-supported/tpm2-unlock.sh @@ -72,7 +72,7 @@ then fi # Install needed tools -apt install clevis-tpm2 clevis-luks clevis-initramfs -y +apt-get install clevis-tpm2 clevis-luks clevis-initramfs -y # Execute the script print_text_in_color "$ICyan" "Setting up automatic unlocking via TPM2..." @@ -81,7 +81,7 @@ 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 autoremove -y + apt-get autoremove -y msg_box "All installed packets were successfully removed." exit 1 fi diff --git a/not-supported/veracrypt-btrfs.sh b/not-supported/veracrypt-btrfs.sh index da58e6d2..5ce71ddb 100644 --- a/not-supported/veracrypt-btrfs.sh +++ b/not-supported/veracrypt-btrfs.sh @@ -35,8 +35,8 @@ we need to add a 3rd Party PPA, which theoretically could set your server under fi msg_box "We will now install Veracrypt. This can take a long time. Please be patient!" add-apt-repository ppa:unit193/encryption -y - apt update -q4 & spinner_loading - apt install veracrypt --no-install-recommends -y + apt-get update -q4 & spinner_loading + apt-get install veracrypt --no-install-recommends -y fi # Discover drive diff --git a/not-supported/veracrypt-ntfs.sh b/not-supported/veracrypt-ntfs.sh index 4584441e..1f0a1250 100644 --- a/not-supported/veracrypt-ntfs.sh +++ b/not-supported/veracrypt-ntfs.sh @@ -35,8 +35,8 @@ we need to add a 3rd Party PPA, which theoretically could set your server under fi msg_box "We will now install Veracrypt. This can take a long time. Please be patient!" add-apt-repository ppa:unit193/encryption -y - apt update -q4 & spinner_loading - apt install veracrypt --no-install-recommends -y + apt-get update -q4 & spinner_loading + apt-get install veracrypt --no-install-recommends -y fi # Discover drive diff --git a/old/modsecurity.sh b/old/modsecurity.sh index 50c2d2de..2929a10a 100644 --- a/old/modsecurity.sh +++ b/old/modsecurity.sh @@ -19,7 +19,7 @@ debug_mode root_check # Add modsecurity -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading install_if_not libapache2-mod-security2 install_if_not modsecurity-crs mv /etc/modsecurity/modsecurity.conf-recommended /etc/modsecurity/modsecurity.conf diff --git a/static/docker_overlay2.sh b/static/docker_overlay2.sh index 32120246..25f1cde2 100644 --- a/static/docker_overlay2.sh +++ b/static/docker_overlay2.sh @@ -148,7 +148,7 @@ rm -Rf /var/cache/apt/archives/aufs* # Upgrade docker to latest version rm -Rf /var/lib/docker -apt update -q4 & spinner_loading +apt-get update -q4 & spinner_loading apt upgrade docker-ce -y # Load docker images back