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-06-19 15:00:20 +0300
committernachoparker <nacho@ownyourbits.com>2018-06-19 18:19:15 +0300
commitc727d65c3c900e610aa5ac93ce24aec84aa48c09 (patch)
tree100746a54f6e747f2987ca28f7ef2f26697c4b61 /etc
parent683cbc89c0c61fca778c3507a9e3d07f1f968f2c (diff)
docker: fix persist ncp-web passwordv0.57.7
Diffstat (limited to 'etc')
-rw-r--r--etc/library.sh2
-rw-r--r--etc/ncp-config.d/nc-passwd.sh9
2 files changed, 10 insertions, 1 deletions
diff --git a/etc/library.sh b/etc/library.sh
index dc3fe457..6d9b4a97 100644
--- a/etc/library.sh
+++ b/etc/library.sh
@@ -179,7 +179,7 @@ function persistent_cfg()
local DST="${2:-/data/etc/$( basename "$SRC" )}"
test -e /changelog.md && return # trick to disable in dev docker
mkdir -p "$( dirname "$DST" )"
- test -d "$DST" || {
+ test -e "$DST" || {
echo "Making $SRC persistent ..."
mv "$SRC" "$DST"
}
diff --git a/etc/ncp-config.d/nc-passwd.sh b/etc/ncp-config.d/nc-passwd.sh
index 4d9243ee..89fdaba2 100644
--- a/etc/ncp-config.d/nc-passwd.sh
+++ b/etc/ncp-config.d/nc-passwd.sh
@@ -15,9 +15,18 @@ DESCRIPTION="Change password for the NextCloudPi Panel"
configure()
{
+ # update password
echo -e "$PASSWORD_\n$CONFIRM_" | passwd ncp &>/dev/null && \
echo "password updated successfully" || \
{ echo "passwords do not match"; return 1; }
+
+ # persist ncp-web password in docker container
+ [[ -f /.docker-image ]] && {
+ mv /etc/shadow /data/etc/shadow
+ ln -s /data/etc/shadow /etc/shadow
+ }
+
+ # activate NCP
a2ensite ncp nextcloud
a2dissite ncp-activation
bash -c "sleep 1.5 && service apache2 reload" &>/dev/null &