1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-17 17:57:23 +01:00

Hardcode PHP version

This commit is contained in:
KiekerJan
2025-02-12 15:38:30 +01:00
parent f7386d1e36
commit cac493fcf3
9 changed files with 25 additions and 41 deletions

View File

@@ -2,6 +2,7 @@
#
# This script will restore the backup made during an installation
source /etc/mailinabox.conf # load global vars
source ./setup/functions.sh
if [ -z "$1" ]; then
echo "Usage: owncloud-restore.sh <backup directory>"
@@ -26,9 +27,6 @@ if [ ! -f "$1/config.php" ]; then
fi
echo "Restoring backup from $1"
PHP_VER=$(php_version)
service php$PHP_VER-fpm stop
# remove the current ownCloud/Nextcloud installation

View File

@@ -7,8 +7,9 @@
# purpopses only. After this point you are on your own.
source /etc/mailinabox.conf # load global vars
source ./setup/functions.sh
ADMIN=$(./mail.py user admins | head -n 1)
ADMIN=$(sudo ./management/cli.py user admins | head -n 1)
test -z "$1" || ADMIN=$1
echo "I am going to unlock admin features for $ADMIN."
@@ -19,5 +20,5 @@ echo "If in doubt, press CTRL-C to cancel."
echo
echo "Press enter to continue."
read
PHP_VER=$(php_version)
sudo -u www-data "php$PHP_VER" /usr/local/lib/owncloud/occ group:adduser admin "$ADMIN" && echo "Done."