tor: 0.1.2.18 -> 0.1.2.19
This commit is contained in:
parent
ae3f82a8c2
commit
99056c3d09
@ -1,2 +1,2 @@
|
||||
6cfe65643f3874a9709f0c19e7c648e0 tor-0.1.2.18.tar.gz
|
||||
4b3f9963b843010af5aa3bd6266d11e0 tor-0.1.2.19.tar.gz
|
||||
128bcc0a2ae7a3a6fa86935cabeb9a4b tor.rc
|
||||
|
@ -5,7 +5,7 @@
|
||||
# Depends on: libevent
|
||||
|
||||
name=tor
|
||||
version=0.1.2.18
|
||||
version=0.1.2.19
|
||||
release=1
|
||||
source=(http://tor.eff.org/dist/tor-$version.tar.gz \
|
||||
tor.rc)
|
||||
|
@ -7,8 +7,9 @@ PRECAUTION:
|
||||
|
||||
PRE-INSTALL:
|
||||
|
||||
Tor expects to have a user and group dedicated to it, a pre-install script has
|
||||
been added to the port which takes care of this.
|
||||
Tor expects to have a user and group dedicated to it, a
|
||||
pre-install script has been added to the port which takes
|
||||
care of this.
|
||||
|
||||
POST-INSTALL:
|
||||
|
||||
@ -18,5 +19,6 @@ POST-REMOVE:
|
||||
|
||||
NOTES:
|
||||
|
||||
Please edit /etc/tor/torrc and add "tor" to the SERVICES array in /etc/rc.conf
|
||||
Please edit /etc/tor/torrc and add "tor" to the SERVICES
|
||||
array in /etc/rc.conf
|
||||
|
||||
|
28
tor/pre-install
Normal file → Executable file
28
tor/pre-install
Normal file → Executable file
@ -8,13 +8,15 @@ USER_COMMENT="Tor Daemon"
|
||||
USER_HOME=/var/empty
|
||||
USER_SHELL=/bin/sh
|
||||
|
||||
if [ $GROUP ]
|
||||
then
|
||||
if ! grep -qi $GROUP /etc/group
|
||||
then
|
||||
if [ ! $(id -u) = 0 ]; then
|
||||
echo "ERROR: you need to be root to run this!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $GROUP ]; then
|
||||
if ! getent group $GROUP > /dev/null; then
|
||||
/usr/sbin/groupadd $GROUP
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Group: $GROUP added."
|
||||
fi
|
||||
else
|
||||
@ -22,13 +24,17 @@ if [ $GROUP ]
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! grep -qi $USER /etc/shadow
|
||||
then
|
||||
if ! getent passwd $USER > /dev/null; then
|
||||
/usr/sbin/useradd -g $GROUP -c "$USER_COMMENT" -d $USER_HOME -s $USER_SHELL $USER
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
/usr/bin/passwd -l $USER
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "User: $USER added."
|
||||
/usr/bin/passwd -l $USER
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Locked $USER account."
|
||||
fi
|
||||
else
|
||||
echo "ERROR: unable to lock $USER account."
|
||||
/usr/sbin/userdel $USER
|
||||
fi
|
||||
else
|
||||
echo "User: $USER already exists! Skipping."
|
||||
|
Loading…
Reference in New Issue
Block a user