dataset/seed/znc/templates/znc_passwords

9 lines
248 B
Text
Raw Normal View History

2022-12-25 17:09:14 +01:00
%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