You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
420 B
Bash

#!/bin/sh
# the script installs tor and its config file from files/etc/tor/torrc.
set -e
xbps-install -y tor
conffile=etc/tor/torrc
test -f /$conffile && diff /$conffile files/$conffile
if [ $? -ne 0 ]; then
cp /$conffile /$conffile.orig
cp files/$conffile /$conffile
ln -sfT /etc/sv/tor /var/service/tor
# don't touch the service if on manual control
test ! -f /etc/sv/tor/down && sv restart tor
fi