diff --git a/roles/shell/files/var/lib/znc/create-znc_account.sh b/roles/shell/files/var/lib/znc/create-znc_account.sh deleted file mode 100755 index 3af45a84..00000000 --- a/roles/shell/files/var/lib/znc/create-znc_account.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -# 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 ]] -then - echo -e "Usage: $(basename $0) [username] [password]" - exit -fi - -# search if $username has been added previously -if grep -iq $1 $CONF -then - echo -e "User: '$1' already exists" - exit -fi - -username=$1 -password=$2 - -kill -s USR1 $PID # Rewrite znc.conf -sleep 1 - -# set username and password -sed s/newuser/$username/g $NEWCONF >> $CONF -expect << EOF | grep -E 'Hash|Salt' | tr -d \\r >> $CONF -spawn znc --makepass -expect "*Enter password: " -send "$password\r" -expect "*Confirm password: " -send "$password\r" -expect eof -EOF -echo " " >> $CONF -echo "" >> $CONF - -sleep 1 -kill -s HUP $PID # Reload znc.conf -sleep 1 -kill -s USR1 $PID # Rewrite znc.conf diff --git a/roles/shell/files/var/lib/znc/znc_account.newconf b/roles/shell/files/var/lib/znc/znc_account.newconf deleted file mode 100644 index 0c49eb03..00000000 --- a/roles/shell/files/var/lib/znc/znc_account.newconf +++ /dev/null @@ -1,25 +0,0 @@ - - Admin = false - AltNick = newuser|znc - AppendTimestamp = false - AutoClearChanBuffer = true - AutoClearQueryBuffer = true - Buffer = 50 - DenyLoadMod = false - DenySetBindHost = false - Ident = newuser - JoinTries = 10 - LoadModule = chansaver - MaxJoins = 0 - MaxNetworks = 2 - MaxQueryBuffers = 50 - MultiClients = true - Nick = newuser - PrependTimestamp = true - QuitMsg = bouncer provider thunix.net - RealName = Got Thunix ? - StatusPrefix = * - TimestampFormat = [%H:%M:%S] - - - Method = SHA256 diff --git a/roles/shell/tasks/znc.yml b/roles/shell/tasks/znc.yml index 82397290..ee584176 100644 --- a/roles/shell/tasks/znc.yml +++ b/roles/shell/tasks/znc.yml @@ -35,22 +35,6 @@ [Install] WantedBy=multi-user.target -- name: Install znc_newaccount - copy: - src: ../files/var/lib/znc/znc_account.newconf - dest: /var/lib/znc/znc_account.newconf - owner: znc - group: root - mode: 0660 - -- name: Install znc user script - copy: - src: ../files/var/lib/znc/create-znc_account.sh - dest: /var/lib/znc/create-znc_account.sh - owner: znc - group: root - mode: 0770 - - name: Install LE hook copy: src: ../files/etc/letsencrypt/renewal-hooks/update-znc.pem