dataset/seed/znc/templates/znc_passwords

8 lines
244 B
Bash

#!/bin/bash -e
# Convert password with znc
password="{{ user_password }}"
pass=$(echo -e "$password\n$password\n"|/usr/bin/znc -ns|grep -A4 '<Pass');
pass_sed=${pass//$'\n'/\\$'\n'}
sed -i "s%@@PASSWORD@@%$pass_sed%g" /etc/znc/znc.conf
exit 0