Skip to content
Snippets Groups Projects
Commit f77a0f71 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

Test for "$CAL_USR"/"$CAL_PWD"

parent 97a1193f
No related branches found
No related tags found
No related merge requests found
...@@ -10,15 +10,19 @@ fi ...@@ -10,15 +10,19 @@ fi
AUTH_FILE='/srv/www/data/webapps/js/vl-auth.js' AUTH_FILE='/srv/www/data/webapps/js/vl-auth.js'
source /etc/environment if [ -f /etc/environment ]; then
source /etc/environment
#echo "$CAL_USR" fi
#echo "$CAL_PWD"
echo "Update: ${AUTH_FILE}" if [ ! -z "$CAL_USR" ] && [ ! -z "$CAL_PWD" ]; then
sed -i "s/couchdb_usr:'.*'/couchdb_usr:'${CAL_USR}'/" ${AUTH_FILE} #echo "$CAL_USR"
sed -i "s/couchdb_pw:'.*'/couchdb_pw:'${CAL_PWD}'/" ${AUTH_FILE} #echo "$CAL_PWD"
chown ${DEST_USER}:${DEST_GROUP} ${AUTH_FILE} echo "Update: ${AUTH_FILE}"
sed -i "s/couchdb_usr:'.*'/couchdb_usr:'${CAL_USR}'/" ${AUTH_FILE}
sed -i "s/couchdb_pw:'.*'/couchdb_pw:'${CAL_PWD}'/" ${AUTH_FILE}
chown ${DEST_USER}:${DEST_GROUP} ${AUTH_FILE}
fi
exit exit
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment