Commit adad9f71 authored by Vitaly Lipatov's avatar Vitaly Lipatov

вынес пароль в конфиг (в репозитории — пример)

parent 08f697e4
DB_USER=dbuser
DB_PASS=passwd
DB_HOST=mysqlhost
DB=dbname
REALM=im.etersoft.ru
FROMEMAIL=noreply@etersoft.ru
......@@ -5,13 +5,7 @@
# ./restore_jabberd_passwd.sh LOGIN [e-mail]
# supports only im.etersoft.ru now
DB_USER=eter_jabber
DB_PASS=S7PCfhJj9v9eUMsm
DB_HOST=mysql.priv.etersoft.ru
DB=eter_jabber
REALM=im.etersoft.ru
EMAIL=lav@etersoft.ru
. $(dirname $0)/restore_jabberd_passwd.conf
mysql_query()
......@@ -37,7 +31,7 @@ fi
test -n "$USEREMAIL" || fatal "E-mail is missed in user vcard. You can run this script with user e-email as second arg."
echo "E-mail: $USEREMAIL"
EMAIL=$EMAIL mutt $USEREMAIL -s "Jabber password from im.etersoft.ru" << EOF
EMAIL=$FROMEMAIL mutt $USEREMAIL -s "Jabber password from $REALM server" << EOF
Hello,
Your password recovery request for $LOGIN@$REALM jabber account has handled.
......@@ -49,4 +43,4 @@ With best regards,
Etersoft robot,
$(LANG=C date)
EOF
echo "Mailed from $EMAIL to $USEREMAIL"
echo "Mailed from $FROMEMAIL to $USEREMAIL"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment