install.sh,1.54.0.sh: Make sure, gnupg is installed

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias K 2024-04-30 14:54:26 +02:00
parent 218a6584a7
commit f49d710dea
No known key found for this signature in database
GPG Key ID: 44FD368932E645C1
2 changed files with 17 additions and 3 deletions

View File

@ -41,7 +41,7 @@ to revert these changes afterwards (set PermitRootLogin to 'yes' in /etc/ssh/ssh
# get dependencies
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y git ca-certificates sudo lsb-release wget jq
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y git ca-certificates sudo lsb-release wget jq gnupg2
# get install code
if [[ "${CODE_DIR}" == "" ]]; then

View File

@ -1,24 +1,38 @@
#!/usr/bin/env bash
set -ex
echo "Update root login prevention method..."
if getent passwd "root" | grep -e '/usr/sbin/nologin'
then
chsh -s /bin/bash root
passwd -l root
sed -i -e 's/^PermitRootLogin.*$/PermitRootLogin No/' /etc/ssh/sshd_config
fi
echo "done."
echo "Fixing trusted proxies list..."
for i in {10..15}
do
proxy="$(ncc config:system:get trusted_proxies "$i" || echo 'NONE')"
[[ "$proxy" == 'NONE' ]] || python3 -c "import ipaddress; ipaddress.ip_address('${proxy}')" || ncc config:system:delete trusted_proxies "$i"
[[ "$proxy" == 'NONE' ]] || python3 -c "import ipaddress; ipaddress.ip_address('${proxy}')" > /dev/null 2>&1 || ncc config:system:delete trusted_proxies "$i"
done
echo "done."
echo "Updating PHP package signing key..."
apt-get update
apt-get install --no-install-recommends -y gnupg2
apt-key adv --fetch-keys https://packages.sury.org/php/apt.gpg
echo "done."
apt-get update
echo "Installing dependencies..."
apt-get install --no-install-recommends -y tmux
echo "done."
echo "Updating obsolete theming URL"
if [[ "$(ncc config:app:get theming url)" == "https://ownyourbits.com" ]]
then
ncc config:app:set theming url --value="https://nextcloudpi.com"
fi
echo "done."