Added webUser variable.
NC maint mode.
This commit is contained in:
parent
8ae55fb199
commit
67642ab276
@ -8,7 +8,7 @@
|
|||||||
### Events:
|
### Events:
|
||||||
### 1. Copy 503 error page to stop NGINX from serving web clients.
|
### 1. Copy 503 error page to stop NGINX from serving web clients.
|
||||||
### (this depends on a complementary NGINX configuration)
|
### (this depends on a complementary NGINX configuration)
|
||||||
### 2. Put NextCloud in maintenence mode to prevent logins and changes.
|
### 2. Put NextCloud in maintenance mode to prevent logins and changes.
|
||||||
### 3. SQLdump from NextCloud.
|
### 3. SQLdump from NextCloud.
|
||||||
### 4. Borg backup all files from xtraLocations.
|
### 4. Borg backup all files from xtraLocations.
|
||||||
### 5. Borg backup NextCloud data and files.
|
### 5. Borg backup NextCloud data and files.
|
||||||
@ -19,6 +19,9 @@
|
|||||||
|
|
||||||
### Script variables -- please ensure they are accurate!
|
### Script variables -- please ensure they are accurate!
|
||||||
|
|
||||||
|
# web user on your system (default: www-data)
|
||||||
|
webUser=www-data
|
||||||
|
|
||||||
# FULL path to NGINX webroot (default: /usr/share/nginx/html)
|
# FULL path to NGINX webroot (default: /usr/share/nginx/html)
|
||||||
webroot=/usr/share/nginx/html
|
webroot=/usr/share/nginx/html
|
||||||
|
|
||||||
@ -169,6 +172,10 @@ else
|
|||||||
echo -e "Script will continue processing..." >> $logFile
|
echo -e "Script will continue processing..." >> $logFile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## Put NextCloud in maintenance mode
|
||||||
|
sudo -u ${webUser} php "${ncroot}/occ maintenance:mode --on" 2>> $logFile
|
||||||
|
|
||||||
## Read sqlDetails file and extract necessary information
|
## Read sqlDetails file and extract necessary information
|
||||||
mapfile -t sqlParams < $sqlDetails
|
mapfile -t sqlParams < $sqlDetails
|
||||||
|
|
||||||
|
## Dump SQL
|
||||||
|
Loading…
Reference in New Issue
Block a user