diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2020-12-01 12:30:34 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-12-01 13:27:09 +0100 |
commit | fb25c368a36c25132cacfb97ab78cea1eab2100d (patch) | |
tree | 0876d38f68cf8e6ec5c3a45e191fecdd6fb135b9 | |
parent | 608aa15970ada7c8d6687e2b60e7a361fe7ad6ea (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.
-rwxr-xr-x | server/bin/setsmbpass | 3 |
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 |