bitlbee: add user and group in pre-install instead of post-install
This commit is contained in:
parent
acf65b7298
commit
2f3fe04ee4
@ -9,7 +9,10 @@ drwxr-xr-x root/root usr/man/man5/
|
||||
drwxr-xr-x root/root usr/man/man8/
|
||||
-rw-r--r-- root/root usr/man/man8/bitlbee.8.gz
|
||||
drwxr-xr-x root/root usr/sbin/
|
||||
-rwxr-x--- root/root usr/sbin/bitlbee
|
||||
-rwxr-x--- root/bitlbee usr/sbin/bitlbee
|
||||
drwxr-xr-x root/root usr/share/
|
||||
drwxr-xr-x root/root usr/share/bitlbee/
|
||||
-rw-r--r-- root/root usr/share/bitlbee/help.txt
|
||||
drwx------ bitlbee/bitlbee var/
|
||||
drwx------ bitlbee/bitlbee var/lib/
|
||||
drwx------ bitlbee/bitlbee var/lib/bitlbee/
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
name=bitlbee
|
||||
version=1.0
|
||||
release=1
|
||||
release=2
|
||||
source=(http://get.$name.org/src/$name-$version.tar.gz)
|
||||
|
||||
build() {
|
||||
@ -20,5 +20,8 @@ build() {
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
make DESTDIR=$PKG install-etc
|
||||
|
||||
install -d -m 0700 -o bitlbee -g bitlbee $PKG/var/lib/bitlbee
|
||||
chmod 0750 $PKG/usr/sbin/$name
|
||||
chown root:bitlbee $PKG/usr/sbin/$name
|
||||
}
|
||||
|
@ -2,11 +2,18 @@ REQUIREMENTS
|
||||
|
||||
PRE-INSTALL
|
||||
|
||||
Run the pre-install script with "sh pre-install" to create the 'bitlbee'
|
||||
user and group.
|
||||
|
||||
POST-INSTALL
|
||||
|
||||
Run the post-install script with "sh post-install", see if the ircd
|
||||
entry was added correctly to /etc/inetd.conf and restart inetd. Now you
|
||||
should be able to connect 127.0.0.1:6667 with your IRC client. You might
|
||||
want to add inetd to the SERVICES array in /etc/rc.conf.
|
||||
Add the following to /etc/inetd.conf:
|
||||
|
||||
ircd stream tcp nowait bitlbee /usr/sbin/bitlbee bitlbee
|
||||
|
||||
Start or restart inetd. Now you should be able to connect 127.0.0.1:6667
|
||||
with your IRC client. You might want to add inetd to the SERVICES array
|
||||
in /etc/rc.conf and set up a firewall or modify /etc/hosts.deny to stop
|
||||
outsiders from accessing your BitlBee gateway.
|
||||
|
||||
PRECAUTION
|
||||
|
@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/bin/grep -q ^bitlbee: /etc/group
|
||||
if [ $? -eq 1 ] ; then
|
||||
/usr/sbin/groupadd bitlbee
|
||||
fi
|
||||
|
||||
/usr/bin/grep -q ^bitlbee: /etc/passwd
|
||||
if [ $? -eq 1 ] ; then
|
||||
/usr/sbin/useradd -g bitlbee -c BitlBee -d /var/lib/bitlbee -s /bin/false bitlbee
|
||||
/usr/bin/passwd -l bitlbee
|
||||
fi
|
||||
|
||||
if [ ! -d /var/lib/bitlbee ] ; then
|
||||
/bin/mkdir /var/lib/bitlbee
|
||||
fi
|
||||
|
||||
/usr/bin/grep -q bitlbee /etc/inetd.conf
|
||||
if [ $? -eq 1 ] ; then
|
||||
echo 'ircd stream tcp nowait bitlbee /usr/sbin/bitlbee bitlbee' >> /etc/inetd.conf
|
||||
fi
|
||||
|
||||
/bin/chmod 0700 /var/lib/bitlbee
|
||||
/bin/chown root:bitlbee /usr/sbin/bitlbee
|
||||
/bin/chown -R bitlbee:bitlbee /var/lib/bitlbee
|
12
bitlbee/pre-install
Normal file
12
bitlbee/pre-install
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/bin/grep -q ^bitlbee: /etc/group
|
||||
if [ $? -eq 1 ] ; then
|
||||
/usr/sbin/groupadd bitlbee
|
||||
fi
|
||||
|
||||
/usr/bin/grep -q ^bitlbee: /etc/passwd
|
||||
if [ $? -eq 1 ] ; then
|
||||
/usr/sbin/useradd -g bitlbee -c BitlBee -d /var/lib/bitlbee -s /bin/false bitlbee
|
||||
/usr/bin/passwd -l bitlbee
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user