dataset/seed/znc/templates/znc_passwords

9 lines
244 B
Text
Raw Permalink Normal View History

2023-06-23 08:12:05 +02:00
#!/bin/bash -e
2022-12-25 17:09:14 +01:00
# Convert password with znc
2023-06-23 08:12:05 +02:00
password="{{ user_password }}"
2022-12-25 17:09:14 +01:00
pass=$(echo -e "$password\n$password\n"|/usr/bin/znc -ns|grep -A4 '<Pass');
pass_sed=${pass//$'\n'/\\$'\n'}
2023-06-23 08:12:05 +02:00
sed -i "s%@@PASSWORD@@%$pass_sed%g" /etc/znc/znc.conf
2022-12-25 17:09:14 +01:00
exit 0