summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstaller/opengnsys_installer.sh3
-rwxr-xr-xinstaller/opengnsys_update.sh6
2 files changed, 8 insertions, 1 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index 75cfbdbe..d199f908 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -1576,7 +1576,8 @@ EOT
$ENABLESERVICE; $STARTSERVICE
echoAndLog "${FUNCNAME}(): Creating ogClient config files."
- sed -i -e "s/127\.0\.0\.1/$OPENGNSYS_SERVERIP/g" \
+ sed -i -e 's/127.0.0.1/'$OPENGNSYS_SERVERIP'/' \
+ -e 's/pass'.*$'/pass\": \"'$OPENGNSYS_CLIENT_PASSWD'\"/' \
$INSTALL_TARGET/client/ogClient/cfg/ogclient.json
}
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index 1154ff94..596fbbdc 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -1207,6 +1207,7 @@ function updateClient()
function updateOgClient()
{
local ogclientUrl="https://codeload.github.com/opengnsys/ogClient/zip/$BRANCH"
+ local CLIENTPASS
echoAndLog "${FUNCNAME}(): downloading ogClient code..."
@@ -1219,6 +1220,11 @@ function updateOgClient()
fi
if [ -e $INSTALL_TARGET/client/ogClient/cfg/ogclient.json ]; then
rm -f ogClient-"$BRANCH"/cfg/ogclient.json
+ else
+ CLIENTPASS=$(awk -F":" '{print $2}' /etc/rsyncd.secrets)
+ sed -i -e 's/127.0.0.1/'$ServidorAdm'/' \
+ -e 's/pass'.*$'/pass\": "'$CLIENTPASS'"/' \
+ ogClient-"$BRANCH"/cfg/ogclient.json
fi
rsync -irplt "ogClient-$BRANCH/" $INSTALL_TARGET/client/ogClient
rm -f ogclient.zip