summaryrefslogtreecommitdiffstats
path: root/server/bin
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2020-12-01 12:30:34 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-12-01 13:27:09 +0100
commitfb25c368a36c25132cacfb97ab78cea1eab2100d (patch)
tree0876d38f68cf8e6ec5c3a45e191fecdd6fb135b9 /server/bin
parent608aa15970ada7c8d6687e2b60e7a361fe7ad6ea (diff)
#1009 Add ogclient.json update to setsmbpass
ogclient.json has samba user and pass because ogVDI needs them to upload qcow2 images to the repository. setsmbpass sets user and pass and updates ogLives to match. If a user executes setsmbpass, then ogclient.json samba info becomes outdated. Add ogclient.json samba user and pass update to setsmbpass script.
Diffstat (limited to 'server/bin')
-rwxr-xr-xserver/bin/setsmbpass3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/bin/setsmbpass b/server/bin/setsmbpass
index 4920d399..44449fbb 100755
--- a/server/bin/setsmbpass
+++ b/server/bin/setsmbpass
@@ -104,6 +104,9 @@ for OGLIVE in $LIST; do
fi
done
if [[ $CHANGES != 0 ]]; then
+ jq ".samba.user = \"$SAMBAUSER\" | .samba.pass = \"$SAMBAPASS\"" \
+ "$OPENGNSYS"/client/ogClient/cfg/ogclient.json > /tmp/ogclient.json
+ mv /tmp/ogclient.json "$OPENGNSYS"/client/ogClient/cfg/ogclient.json
# Ticket 565, preparar acceso Rsync servidor.
[ -e /etc/rsyncd.secrets ] && sed -i -n -e "/^$SAMBAUSER:/!p" -e "$ a$SAMBAUSER:$SAMBAPASS" /etc/rsyncd.secrets || echo "$SAMBAUSER:$SAMBAPASS" > /etc/rsyncd.secrets
chown root.root /etc/rsyncd.secrets