qwebIRC Oto Kurulum Script

Aytac

Developer
Yönetici
Developer
Katılım
4 Şub 2020
Mesajlar
373
Tepkime puanı
17
Puanları
18
Konum
ircland
Web sitesi
www.ircalem.net
qwebirc adı altında bir dosya açıp aşşağıda ki kodları içerisine kopyalayın.

Kod:
#!/bin/bash
rumuz="BehroozWolf"
mename="behroozwolf.net"
ip="127.0.0.1"
sari="\033[1;33m"
kirmizi="\033[0;31m"
beyaz="\e[1;37m"
yesil="\e[0;32m"
ayesil="\e[1;32m"
renksonu="\033[0m"

function guncelle {
    yum -y update
    echo "Sistem guncellendi."
    sleep 1
    bagimlilik
}

function bagimlilik {
   yum -y install epel-release
   yum -y groupinstall 'Development Tools'
   yum -y install python-twisted mercurial java-1.6.0-openjdk-devel openssl-devel python-devel python-pip
   kur
}

function kur {  
printf "${ayesil} Klasorler kontrol ediliyor...Lutfen bekleyin.${renksonu}\n"
if [ -d "qwebirc" ]; then 
   printf "${sari} qwebirc klasoru icerisinde dosyalar mevcut. Klasoru silip yeniden deneyiniz.${renksonu}\n"
   exit     
else
   printf "${ayesil} Klasor kontrolu tamamlandi.${renksonu}\n"
fi

printf "${sari} Kurulum yapilacak olan sunucu ismini yaziniz ${renksonu}\n"
echo -e $n "${beyaz} [$mename] -> $c ${renksonu}"
read cc
if [ ! -z $cc ]; then
	mename="$cc"
fi

printf "${sari} Sunucunun calisacagi IP adresi ${renksonu}\n"
echo -e $n "${beyaz} [$ip] -> $c ${renksonu}"
read cc
if [ ! -z $cc ]; then
	ip="$cc"
fi 

git clone https://github.com/qwebirc/qwebirc.git
cd qwebirc
echo "# -*- coding: utf-8 -*-" >> config.py
echo "from qwebirc.config_options import *" >> config.py
echo "IRCSERVER, IRCPORT = "\"$ip"\", 7001" >> config.py
echo "REALNAME = "\"http://mobil.$mename"\"" >> config.py
echo "IDENT = "\"MobiL"\"" >> config.py
echo "WEBIRC_MODE = "\"webirc"\"" >> config.py
echo "WEBIRC_PASSWORD = "\"ofsbilisim"\"" >> config.py
echo "BASE_URL = "\"http://$ip:9090/"\"" >> config.py
echo "NETWORK_NAME = "\"$mename"\"" >> config.py
echo "APP_TITLE = NETWORK_NAME + "\" Web IRC"\"" >> config.py
echo "NICKNAME_VALIDATE = False" >> config.py
echo "import string" >> config.py
echo "NICKNAME_VALID_FIRST_CHAR = string.letters + "\"öÖçÇıIğĞüÜşŞÅ¾_[]{}\`\^\\\|"\"" >> config.py
echo "NICKNAME_VALID_SUBSEQUENT_CHARS = NICKNAME_VALID_FIRST_CHAR + string.digits + "\"-"\"" >> config.py
echo "NICKNAME_MINIMUM_LENGTH = 2" >> config.py
echo "NICKNAME_MAXIMUM_LENGTH = 20" >> config.py
echo "FEEDBACK_FROM = "\"[email protected]$mename"\"" >> config.py
echo "FEEDBACK_TO = "\"[email protected]$mename"\"" >> config.py
echo "FEEDBACK_SMTP_HOST, FEEDBACK_SMTP_PORT = "\"$ip"\", 25" >> config.py
echo "ADMIN_ENGINE_HOSTS = ["\"$ip"\"]" >> config.py
echo "FORWARDED_FOR_HEADER = "\"x-forwarded-for"\"" >> config.py
echo "FORWARDED_FOR_IPS = ["\"$ip"\"]" >> config.py
echo "#ARGS = "\"-n -p 3989"\"" >> config.py
echo "#SYSLOG_ADDR = "\"$ip"\", 514" >> config.py
echo "UPDATE_FREQ = 0.5" >> config.py
echo "MAXBUFLEN = 70000000" >> config.py
echo "MAXSUBSCRIPTIONS = 1" >> config.py
echo "MAXLINELEN = 600" >> config.py
echo "DNS_TIMEOUT = 3" >> config.py
echo "HTTP_AJAX_REQUEST_TIMEOUT = 295" >> config.py
echo "HTTP_REQUEST_TIMEOUT = 5" >> config.py
echo "STATIC_BASE_URL = "\""\"" >> config.py
echo "DYNAMIC_BASE_URL = "\""\"" >> config.py
echo "CONNECTION_RESOLVER = None" >> config.py
echo "HMACKEY = "\"mrmoo"\"" >> config.py
echo "HMACTEMPORAL = 30" >> config.py
echo "AUTHGATEDOMAIN = "\"webchat_test"\"" >> config.py
echo "QTICKETKEY = "\"boo"\"" >> config.py
echo "AUTH_SERVICE = "\"[email protected]$mename"\"" >> config.py
echo "AUTH_OK_REGEX = "\"^You are now logged in as [^ ]+\\.$"\"" >> config.py
echo "import dummyauthgate as AUTHGATEPROVIDER" >> config.py
echo "NICK_SERVICE = "\"[email protected]$mename"\"" >> config.py
echo "RECAPTCHA_KEY = None" >> config.py
echo "ANALYTICS = None" >> config.py
./compile.py
./run.py
cd
}

case "${1}" in
	[k][u][r]) 
	guncelle
	;;
	*)
	printf "${kirmizi}Kurmak icin ${mavi}qwebirc kur ${kirmizi}yazmalisiniz.${renksonu}\n"
	;;
esac

Daha sonra, chmod ile dosyaya gerekli izinleri vererek ./qwebirc kur ya da sh qwebirc kur yazarak kurulumu başlatabilirsiniz.

NOT: CentOS 6.5 üzerinde denenmiştir.
 
Üst