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

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-03-20 21:28:29 +0300
committernachoparker <nacho@ownyourbits.com>2018-03-20 21:30:16 +0300
commit062438b7e3e823936e45d94f8ac1174c1c70cef9 (patch)
tree08e85863e9cba3cb754b8048e1f55a80334dbafc /etc
parente471e7b8bf21114e5d4c26a6b7e086dbd3c2ca04 (diff)
NFS: check user and group existencev0.53.5
Diffstat (limited to 'etc')
-rw-r--r--etc/nextcloudpi-config.d/NFS.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/nextcloudpi-config.d/NFS.sh b/etc/nextcloudpi-config.d/NFS.sh
index 7b990cf3..81acf758 100644
--- a/etc/nextcloudpi-config.d/NFS.sh
+++ b/etc/nextcloudpi-config.d/NFS.sh
@@ -80,6 +80,8 @@ configure()
# CHECKS
################################
+ id "$USER_" &>/dev/null || { echo "user USER_ does not exist" ; return 1; }
+ id -g "$GROUP_" &>/dev/null || { echo "group GROUP_ does not exist"; return 1; }
[ -d "$DIR_" ] || { echo -e "INFO: directory $DIR_ does not exist. Creating"; mkdir -p "$DIR_"; }
[[ $( stat -fc%d / ) == $( stat -fc%d $DIR_ ) ]] && \
echo -e "INFO: mounting a in the SD card\nIf you want to use an external mount, make sure it is properly set up"