mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-04-19 06:37:11 -04:00
Patch from dcg: detect /etc/ssmtp.conf changes inside update script, instead of touching a /tmp file
This commit is contained in:
parent
0e50f0bada
commit
052557897e
7
start.sh
7
start.sh
@ -1,11 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -e /tmp/smtpconfig ]]; then
|
||||
echo "smtp configured."
|
||||
else
|
||||
update_ssmtp.sh
|
||||
touch /tmp/smtpconfig
|
||||
fi
|
||||
update_ssmtp.sh
|
||||
|
||||
|
||||
if [[ ! -f ledgersmb.conf ]]; then
|
||||
|
@ -1,4 +1,9 @@
|
||||
#!/bin/bash
|
||||
ConfiguredComment='# install script update_ssmtp.sh has configured ssmtp'
|
||||
grep -nc "$ConfiguredComment" /etc/ssmtp.conf && {
|
||||
echo "smtp configured."
|
||||
exit
|
||||
}
|
||||
|
||||
sed -i \
|
||||
-e "s/\(root=\).*\$/\1$SSMTP_ROOT/g" \
|
||||
@ -10,3 +15,4 @@ sed -i \
|
||||
[ -z "$SSMTP_AUTH_PASS" ] || echo "AuthPass=$SSMTP_AUTH_PASS" >> /etc/ssmtp/ssmtp.conf
|
||||
[ -z "$SSMTP_AUTH_METHOD" ] || echo "AuthMethod=$SSMTP_AUTH_METHOD" >> /etc/ssmtp/ssmtp.conf
|
||||
[ -z "$SSMTP_FROMLINE_OVERRIDE" ] || echo "FromLineOverride=$SSMTP_FROMLINE_OVERRIDE" >> /etc/ssmtp/ssmtp.conf
|
||||
echo "$ConfiguredComment" >> /etc/ssmtp/ssmtp.conf
|
||||
|
Loading…
Reference in New Issue
Block a user