%echo '#!/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
