Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2021-04-05 20:09:37 +0300
committerGitHub <noreply@github.com>2021-04-05 20:09:37 +0300
commitfe4822cd23fcee4f5694856ce732e166aeb37e92 (patch)
tree5bd8f1b250ec1576e945f37098d4fe8f2ad099b4 /apps/smbmount.sh
parente769832c615b78d48828234addc1aac46a7184d4 (diff)
improve the built-in backup solution to work with normal NcVM configurations (#1913)
Diffstat (limited to 'apps/smbmount.sh')
-rw-r--r--apps/smbmount.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/smbmount.sh b/apps/smbmount.sh
index 581a4b3e..99737b3d 100644
--- a/apps/smbmount.sh
+++ b/apps/smbmount.sh
@@ -109,7 +109,6 @@ do
chmod -R 600 $SMB_CREDENTIALS
echo "username=$SMB_USER" > $SMB_CREDENTIALS/SMB$count
echo "password=$SMB_PASSWORD" >> $SMB_CREDENTIALS/SMB$count
- unset SMB_USER && unset SMB_PASSWORD
mkdir -p "$SMBSHARES/$count"
mount "$SMBSHARES/$count"
@@ -132,7 +131,19 @@ As a hint:
# Inform the user that mounting was successful
msg_box "Your mount was successful, congratulations!
It's now accessible in your root directory under $SMBSHARES/$count." "$SUBTITLE"
+ # Allow to make it a backup mount
+ if yesno_box_no "Do you want to use this mount for backups?
+If you choose 'Yes', you will be able to use this mount as target directory for backups of the built-in backup solution!"
+ then
+ umount "$SMBSHARES/$count"
+ sed -i "/$SMBSHARES_SED\/$count /d" /etc/fstab
+ echo "$SERVER_SHARE_NAME $SMBSHARES/$count cifs credentials=$SMB_CREDENTIALS/SMB$count,uid=root,gid=root,file_mode=0600,dir_mode=0600,nounix,noserverino,cache=none,nofail,noauto 0 0" >> /etc/fstab
+ unset SMB_USER && unset SMB_PASSWORD
+ msg_box "The backup mount was successfully created!"
+ break
+ fi
# Check if Nextcloud is existing
+ unset SMB_USER && unset SMB_PASSWORD
NEWNAME="SMB$count"
if ! [ -f $NCPATH/occ ]
then