From af8a6c3a1bff412c2ffca3576daa0d98260c1efa Mon Sep 17 00:00:00 2001 From: Jacob Appelbaum Date: Fri, 26 Aug 2011 19:21:51 +0200 Subject: start arm at boot via cron in a shared screen for torouter --- packages/torouter-prep/configs/tor-arm-crontab | 3 +++ packages/torouter-prep/src/torouter_config.sh | 14 ++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 packages/torouter-prep/configs/tor-arm-crontab (limited to 'packages') diff --git a/packages/torouter-prep/configs/tor-arm-crontab b/packages/torouter-prep/configs/tor-arm-crontab new file mode 100644 index 0000000..b662b22 --- /dev/null +++ b/packages/torouter-prep/configs/tor-arm-crontab @@ -0,0 +1,3 @@ +# Now anyone using the torouter can attach to a long term screen with arm +# This will run at boot time and it should run forever +@reboot screen -d -m -S tor-arm /usr/bin/arm diff --git a/packages/torouter-prep/src/torouter_config.sh b/packages/torouter-prep/src/torouter_config.sh index c2a8527..04a8206 100644 --- a/packages/torouter-prep/src/torouter_config.sh +++ b/packages/torouter-prep/src/torouter_config.sh @@ -11,9 +11,7 @@ export config_dir="/usr/share/torouter-prep/example-configs/" # Add a user to administrate the Torouter later export ADMINUSER="torouter" export ADMINGROUP="torouter" - -addgroup $ADMINGROUP -useradd -g $ADMINGROUP -s /bin/bash $ADMINUSER +export TORADMINGROUP="debian-tor" # Install the Tor repo key # gpg --keyserver keys.gnupg.net --recv 886DDD89 @@ -145,7 +143,6 @@ apt-get -y clean # Fixup apt if something goes wrong apt-get install -f - ## Disable ipv6 support for now cp $config_dir/modprobe.d-blacklist.conf /etc/modprobe.d/blacklist.conf # We don't need this if the ipv6 module is not loaded @@ -166,8 +163,17 @@ apt-get -y install unbound /etc/init.d/tor restart /etc/init.d/ttdnsd restart +addgroup $ADMINGROUP +useradd -g $ADMINGROUP -G $TORADMINGROUP -s /bin/bash $ADMINUSER + +## +## Add arm startup trick with cron for shared screen +## +crontab -u $ADMINUSER $config_dir/tor-arm-crontab + ## ## Touch a stamp to show that we're now a Torouter ## echo "torouter $VERSION" > /etc/torouter +echo "You should reboot now to ensure that everything works as expected" -- cgit v1.2.3