mirror of
https://github.com/ThunixdotNet/ansible.git
synced 2026-01-25 21:40:19 +00:00
Cleaned up testing users, and added fully qualified path to znc script
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
# ZNC account creation
|
||||
CONF="/var/lib/znc/.znc/configs/znc.conf"
|
||||
PID=$(pgrep -u znc znc)
|
||||
NEWCONF="/var/lib/znc/znc_account.newconf"
|
||||
|
||||
# $username and $password are retrieved from create-account script
|
||||
if [[ -z $1 || -z $2 ]]
|
||||
@@ -25,7 +26,7 @@ kill -s USR1 $PID # Rewrite znc.conf
|
||||
sleep 1
|
||||
|
||||
# set username and password
|
||||
sed s/newuser/$username/g znc_account.newconf >> $CONF
|
||||
sed s/newuser/$username/g $NEWCONF >> $CONF
|
||||
expect << EOF | grep -E 'Hash|Salt' | tr -d \\r >> $CONF
|
||||
spawn znc --makepass
|
||||
expect "*Enter password: "
|
||||
|
||||
Reference in New Issue
Block a user