Blame
Date:
Sun Oct 8 22:28:02 2023 UTC
Message:
Now prevents creating accounts that exist in database with a password
01
2023-02-23
jrmu
#!/bin/ksh
02
2023-02-23
jrmu
03
2023-02-23
jrmu
USERNAME="botnow"
04
2023-02-23
jrmu
HOMEDIR="/home/botnow"
05
2023-02-23
jrmu
HTDOCS="/var/www/htdocs/botnow"
06
2023-02-23
jrmu
DATABASE="/var/www/botnow/"
07
2023-02-23
jrmu
ZONES="/var/nsd/zones/master/"
08
2023-02-23
jrmu
ZNCUSER="znc"
09
2023-02-23
jrmu
ZNCDIR="/home/znc/home/znc/"
10
2023-02-23
jrmu
HTTPDCONF="/etc/httpd.conf"
11
2023-02-23
jrmu
ACMECONF="/etc/acme-client.conf"
12
2023-03-06
jrmu
MAILDIR="/etc/mail/"
13
2023-02-26
jrmu
HOSTNAMEIF="/etc/hostname.vio0"
14
2023-07-29
jrmu
IKEDCONF="/etc/iked.conf"
15
2023-02-23
jrmu
16
2023-06-18
jrmu
pkg_add figlet-2.2.5 p5-DBI p5-DBD-SQLite sqlite3 p5-Class-DBI-SQLite
17
2023-02-23
jrmu
cc -o blowfish.o blowfish.c
18
2023-02-23
jrmu
cp blowfish.o ${HOMEDIR}/
19
2023-02-23
jrmu
20
2023-03-01
jrmu
if $(userinfo -e ${USERNAME}); then
21
2023-03-01
jrmu
usermod -d ${HOMEDIR} -G wheel -s /bin/ksh ${USERNAME}
22
2023-03-01
jrmu
else
23
2023-03-01
jrmu
useradd -m -g =uid -c ${USERNAME} -d ${HOMEDIR} -s /bin/ksh ${USERNAME}
24
2023-03-01
jrmu
fi
25
2023-02-25
jrmu
mkdir ${HOMEDIR}
26
2023-02-23
jrmu
mkdir ${DATABASE}
27
2023-02-23
jrmu
chmod o-rx ${DATABASE}
28
2023-02-23
jrmu
touch ${DATABASE}/www
29
2023-02-23
jrmu
chown -R www:${USERNAME} ${DATABASE}
30
2023-02-23
jrmu
chmod -R ug+rwx ${DATABASE}
31
2023-02-23
jrmu
mkdir ${HTDOCS}
32
2023-02-23
jrmu
cp words ${HTDOCS}/
33
2023-02-23
jrmu
cp register.php ${HTDOCS}/
34
2023-02-23
jrmu
chown -R www:daemon ${HTDOCS}
35
2023-02-23
jrmu
chmod o-rwx ${HTDOCS}
36
2023-02-23
jrmu
usermod -G daemon ${USERNAME}
37
2023-02-23
jrmu
usermod -G wheel ${USERNAME}
38
2023-02-23
jrmu
chown -R _nsd:daemon ${ZONES}
39
2023-02-23
jrmu
chmod ug+rwx ${ZONES}
40
2023-02-23
jrmu
chmod ug+rw ${ZONES}/*
41
2023-03-06
jrmu
chmod -R g+rw ${HTTPDCONF} ${ACMECONF} ${MAILDIR}
42
2023-07-29
jrmu
chgrp wheel ${IKEDCONF}
43
2023-07-29
jrmu
chmod g+r ${IKEDCONF}
44
2023-03-06
jrmu
echo "permit nopass ${USERNAME}" >> /etc/doas.conf
45
2023-03-06
jrmu
usermod -G _dovecot botnow
46
2023-02-26
jrmu
chmod g+rw ${HOSTNAMEIF}
47
2023-02-23
jrmu
cp captcha.png register.php ${HTDOCS}/
48
2023-03-12
jrmu
cp LICENSE README botnow botnow.conf.example BNC.pm DNS.pm Mail.pm SQLite.pm Shell.pm table.sql Hash.pm Help.pm install networks captcha.png register.php words report ${HOMEDIR}/
49
2023-03-07
jrmu
mkdir ${HOMEDIR}/backups/
50
2023-02-23
jrmu
chown -R ${USERNAME}:${USERNAME} ${HOMEDIR}
51
2023-03-07
jrmu
chmod -R go-rx ${HOMEDIR}
52
2023-02-23
jrmu
chmod u+x ${HOMEDIR}/botnow
53
2023-02-23
jrmu
chown -R ${ZNCUSER}:daemon ${ZNCDIR}
54
2023-02-23
jrmu
chmod -R ug+r ${ZNCDIR}
55
2023-02-23
jrmu
find ${ZNCDIR} -type d -exec chmod ug+rx {} +
56
2023-02-25
jrmu
echo "Installation complete. To run botnow, type $ ./botnow"
IRCNow