3
# checking debian-tor account
5
uid=`getent passwd debian-tor | cut -d ":" -f 3`
6
home=`getent passwd debian-tor | cut -d ":" -f 6`
8
# if there is the uid the account is there and we can do
9
# the sanit(ar)y checks otherwise we can safely create it.
12
# guess??? the checks!!!
13
if [ $uid -ge 100 ] && [ $uid -le 999 ]; then
14
echo "debian-tor uid check: ok"
16
echo "ERROR: debian-tor account has a non-system uid!"
17
echo "Please check /usr/share/doc/tor/README.Debian on how to"
18
echo "correct this problem"
21
if [ "$home" = "/var/lib/tor" ]; then
22
echo "debian-tor homedir check: ok"
24
echo "ERROR: debian-tor account has an invalid home directory!"
25
echo "Please check /usr/share/doc/tor/README.Debian on how to"
26
echo "correct this problem"
30
# what this might mean?? oh creating a system l^Huser!
41
# ch{owning,moding} things around
42
# We will do nothing across upgrades.
44
if [ "$2" = "" ]; then
45
for i in lib log run; do
46
chown -R debian-tor:debian-tor /var/$i/tor
47
chmod -R 700 /var/$i/tor
48
find /var/$i/tor -type f -exec chmod 600 '{}' ';'