Update backup.sh
added check for root
This commit is contained in:
parent
90463e49e5
commit
757e1c1367
1 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,14 @@ clpLocation="/home/cloudpanel/htdocs/"
|
||||||
user="clp"
|
user="clp"
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Check for root
|
||||||
|
#
|
||||||
|
if [ "$(id -u)" != "0" ]
|
||||||
|
then
|
||||||
|
errorecho "ERROR: This script has to be run as root!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Nextcloud Maintenance aktivieren
|
# Nextcloud Maintenance aktivieren
|
||||||
echo "\n###### Aktiviere Wartungsmodus: ${currentDateReadable} ######\n"
|
echo "\n###### Aktiviere Wartungsmodus: ${currentDateReadable} ######\n"
|
||||||
sudo -u $user php$phpversion $clpLocation$domain/occ maintenance:mode --on
|
sudo -u $user php$phpversion $clpLocation$domain/occ maintenance:mode --on
|
||||||
|
|
Loading…
Reference in a new issue