changed end of config and quotes

This commit is contained in:
Blade of Darkness 2019-01-19 02:47:52 +00:00
parent daab2a05a3
commit cb7405a68e
1 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@
# to create backups?
# ZNC account creation
CONF='~/.znc/configs/znc.conf'
CONF="$HOME/.znc/configs/znc.conf"
# $username and $password are retrieved from create-account script
if [[ -z $username || -z $password ]] && [[ -z $1 || -z $2 ]]
@ -23,7 +23,7 @@ pkill -10 -u znc znc # Rewrite znc.conf
# set username and password
sed s/newuser/$username/g znc_account.newconf >> $CONF
/usr/bin/expect << EOF | grep -E 'Hash|Salt' | tr -d \\r >> $CONF
expect << EOF | grep -E 'Hash|Salt' | tr -d \\r >> $CONF
spawn znc --makepass
expect "*Enter password: "
send "$password\r"
@ -31,7 +31,8 @@ expect "*Confirm password: "
send "$password\r"
expect eof
EOF
echo ' </Pass>\n</User>' >> $CONF
echo " </Pass>" >> $CONF
echo "</User>" >> $CONF
pkill -1 -u znc znc # Reload znc.conf
pkill -10 -u znc znc # Rewrite znc.conf