From fb25c368a36c25132cacfb97ab78cea1eab2100d Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Tue, 1 Dec 2020 12:30:34 +0100 Subject: #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. --- server/bin/setsmbpass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server') 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 -- cgit v1.2.3-18-g5258