Add inadyn username and password if they don't exist
This commit is contained in:
parent
112ff52ad3
commit
bd7f8b4a91
|
@ -129,10 +129,18 @@ function update_inadyn_config {
|
|||
else
|
||||
# change username/password for an existing provider
|
||||
if [ "$DDNS_USERNAME" ]; then
|
||||
if grep -q " username " /etc/inadyn.conf; then
|
||||
sed -i "s| username .*| username $DDNS_USERNAME|g" /etc/inadyn.conf
|
||||
else
|
||||
echo " username $DDNS_USERNAME" >> /etc/inadyn.conf
|
||||
fi
|
||||
fi
|
||||
if [ "$DDNS_PASSWORD" ]; then
|
||||
if grep -q " password " /etc/inadyn.conf; then
|
||||
sed -i "s| password .*| password $DDNS_PASSWORD|g" /etc/inadyn.conf
|
||||
else
|
||||
echo " password $DDNS_PASSWORD" >> /etc/inadyn.conf
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue