change to apt-get instead of apt (#2027)
Signed-off-by: enoch85 <github@hanssonit.se>
This commit is contained in:
Родитель
5b04abac6e
Коммит
7c3c9a671c
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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..."
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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..."
|
||||
|
|
|
@ -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..."
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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" ];
|
||||
|
|
|
@ -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..."
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
10
lib.sh
10
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
|
||||
|
|
|
@ -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 ]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче