forked from Notos/seedbox-from-scratch
-
Notifications
You must be signed in to change notification settings - Fork 17
/
installZNC
executable file
·32 lines (30 loc) · 888 Bytes
/
installZNC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
## This script to run after install to install latest znc
MAINUSER1=`cat /etc/seedbox-from-scratch/mainuser.info`
## Crontab to start ZNC on reboot
if [ `logname` = "$MAINUSER1" ]; then
echo ""
echo -e "\033[0;32;148mInstalling ZNC...\033[39m"
echo ""
cd ~
if [ "$(crontab -l 2> /dev/null | grep -c znc)" == "0" ]; then
wget --no-check-certificate https://raw.githubusercontent.com/dannyti/sboxsetup/master/startznc
perl -pi -e "s/USERNAME/`logname`/g" startznc
chmod +x startznc
bash startznc
fi
wget http://znc.in/releases/znc-latest.tar.gz
tar -xzvf znc*.*gz
cd znc-*
./configure --prefix=$HOME/znc
make
make install
rm -r ~/znc-*
echo
echo -e "\033[0;32;148mPlease configure ZNC...\033[39m"
echo
~/znc/bin/znc --makeconf
rm /home/`logname`/startznc
else
echo -e "\033[0;32;148mPlease install ZNC as Main User.\033[39m"
fi