Config for znc backports
This commit is contained in:
parent
360793c6a2
commit
ab19c7b9f9
|
@ -107,39 +107,45 @@ function add_user_irc_bouncer {
|
|||
|
||||
stop_irc_bouncer
|
||||
|
||||
ZNC_SALT="$(dd if=/dev/urandom bs=16c count=1 | md5sum | awk -F ' ' '{print $1}' | cut -c1-20)"
|
||||
#ZNC_SALT="$(dd if=/dev/urandom bs=16c count=1 | md5sum | awk -F ' ' '{print $1}' | cut -c1-20)"
|
||||
ZNC_SALT='WggsZXvdAmVy4_cu4,_*'
|
||||
new_user_hash=$(echo "${new_user_password}${ZNC_SALT}" | sha256sum | awk -F ' ' '{print $1}')
|
||||
|
||||
echo "<User ${new_username}>" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' <Pass password>' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' Method = sha256' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Hash = ${new_user_hash}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Salt = ${ZNC_SALT}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' </Pass>' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Admin = ${is_admin}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' Allow = *' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Nick = ${new_username}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo " AltNick = ${new_username}_" >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Ident = ${new_username}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo " RealName = ${new_username}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Buffer = $IRC_BUFFER_LENGTH" >> /home/znc/.znc/configs/znc.conf
|
||||
echo " AltNick = ${new_username}_" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' AppendTimestamp = false' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' AutoClearChanBuffer = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' ChanModes = +stn' >> /home/znc/.znc/configs/znc.conf
|
||||
echo '' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' AutoClearQueryBuffer = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' Buffer = 100' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' DenyLoadMod = false' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' DenySetBindHost = false' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Ident = ${new_username}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' JoinTries = 10' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' LoadModule = chansaver' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' LoadModule = controlpanel' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' MaxJoins = 10' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' MaxNetworks = 10' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' MaxQueryBuffers = 50' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' MultiClients = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Nick = ${new_username}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' PrependTimestamp = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' QuitMsg = Bye' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " RealName = ${new_username}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' StatusPrefix = *' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' TimestampFormat = [%H:%M:%S]' >> /home/znc/.znc/configs/znc.conf
|
||||
echo '' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " <Network ${PROJECT_NAME}>" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' LoadModule = chansaver' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' LoadModule = simple_away' >> /home/znc/.znc/configs/znc.conf
|
||||
echo '' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Server = ${DEFAULT_DOMAIN_NAME} +${IRC_PORT}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Server = ${IRC_ONION_HOSTNAME} +${IRC_PORT}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Server = ${DEFAULT_DOMAIN_NAME} ${IRC_PORT} ${IRC_PASSWORD}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Server = ${IRC_ONION_HOSTNAME} ${IRC_PORT} ${IRC_PASSWORD}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo '' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " <Chan ${PROJECT_NAME}>" >> /home/znc/.znc/configs/znc.conf
|
||||
echo " <Chan #${PROJECT_NAME}>" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' </Chan>' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' </Network>' >> /home/znc/.znc/configs/znc.conf
|
||||
|
||||
echo '' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' <Network oftc>' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' LoadModule = chansaver' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' LoadModule = simple_away' >> /home/znc/.znc/configs/znc.conf
|
||||
|
@ -148,7 +154,7 @@ function add_user_irc_bouncer {
|
|||
echo ' IRCConnectEnabled = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' Server = irc.oftc.net 6697' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' </Network>' >> /home/znc/.znc/configs/znc.conf
|
||||
|
||||
echo '' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' <Network freenode>' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' LoadModule = chansaver' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' LoadModule = simple_away' >> /home/znc/.znc/configs/znc.conf
|
||||
|
@ -157,7 +163,12 @@ function add_user_irc_bouncer {
|
|||
echo ' IRCConnectEnabled = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' Server = irc.freenode.net 6697' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' </Network>' >> /home/znc/.znc/configs/znc.conf
|
||||
|
||||
echo '' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' <Pass password>' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Hash = ${new_user_hash}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' Method = sha256' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Salt = ${ZNC_SALT}" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' </Pass>' >> /home/znc/.znc/configs/znc.conf
|
||||
echo '</User>' >> /home/znc/.znc/configs/znc.conf
|
||||
|
||||
mkdir -p /home/znc/.znc/users/${new_username}/moddata
|
||||
|
@ -589,14 +600,25 @@ function install_irc_bouncer {
|
|||
mkdir -p /home/znc/.znc/configs
|
||||
mkdir -p /home/znc/.znc/users
|
||||
|
||||
echo 'Version = 1.6.2' > /home/znc/.znc/configs/znc.conf
|
||||
echo '<Listener l>' >> /home/znc/.znc/configs/znc.conf
|
||||
echo " Port = $IRC_BOUNCER_PORT" >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' IPv4 = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' IPv6 = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' SSL = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo 'AnonIPLimit = 10' > /home/znc/.znc/configs/znc.conf
|
||||
echo 'ConnectDelay = 5' >> /home/znc/.znc/configs/znc.conf
|
||||
echo 'HideVersion = false' >> /home/znc/.znc/configs/znc.conf
|
||||
echo 'MaxBufferSize = 500' >> /home/znc/.znc/configs/znc.conf
|
||||
echo 'ProtectWebSessions = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo 'SSLCertFile = /home/znc/.znc/znc.pem' >> /home/znc/.znc/configs/znc.conf
|
||||
echo 'ServerThrottle = 30' >> /home/znc/.znc/configs/znc.conf
|
||||
echo 'Version = 1.6.2' >> /home/znc/.znc/configs/znc.conf
|
||||
echo '' >> /home/znc/.znc/configs/znc.conf
|
||||
echo '<Listener listener0>' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' AllowIRC = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' AllowWeb = false' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' IPv4 = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' IPv6 = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' Port = 6697' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' SSL = true' >> /home/znc/.znc/configs/znc.conf
|
||||
echo ' URIPrefix = /' >> /home/znc/.znc/configs/znc.conf
|
||||
echo '</Listener>' >> /home/znc/.znc/configs/znc.conf
|
||||
echo 'LoadModule = webadmin' >> /home/znc/.znc/configs/znc.conf
|
||||
echo '' >> /home/znc/.znc/configs/znc.conf
|
||||
|
||||
chown -R znc:znc /home/znc/.znc
|
||||
|
||||
|
|
Loading…
Reference in New Issue