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

...

parent e9954057
No related branches found
No related tags found
No related merge requests found
#! /bin/bash #! /bin/bash
# Rolf Niepraschk (Rolf.Niepraschk@gmx.de), 2025-06-18
DEST_USER=nobody DEST_USER=nobody
...@@ -14,15 +15,19 @@ if [ -f /etc/environment ]; then ...@@ -14,15 +15,19 @@ if [ -f /etc/environment ]; then
source /etc/environment source /etc/environment
fi fi
echo "Update: ${AUTH_FILE}"
if [ ! -z "$CAL_USR" ] && [ ! -z "$CAL_PWD" ]; then if [ ! -z "$CAL_USR" ] && [ ! -z "$CAL_PWD" ]; then
#echo "$CAL_USR" #echo "$CAL_USR"
#echo "$CAL_PWD" #echo "$CAL_PWD"
echo "Update: ${AUTH_FILE}"
sed -i "s/couchdb_usr:'.*'/couchdb_usr:'${CAL_USR}'/" ${AUTH_FILE} sed -i "s/couchdb_usr:'.*'/couchdb_usr:'${CAL_USR}'/" ${AUTH_FILE}
sed -i "s/couchdb_pw:'.*'/couchdb_pw:'${CAL_PWD}'/" ${AUTH_FILE} sed -i "s/couchdb_pw:'.*'/couchdb_pw:'${CAL_PWD}'/" ${AUTH_FILE}
chown ${DEST_USER}:${DEST_GROUP} ${AUTH_FILE} else
sed -i "s/couchdb_usr:'.*'/couchdb_usr:''/" ${AUTH_FILE}
sed -i "s/couchdb_pw:'.*'/couchdb_pw:''/" ${AUTH_FILE}
fi fi
chown ${DEST_USER}:${DEST_GROUP} ${AUTH_FILE}
exit exit
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment