diff --git a/rootfs/root/docker/setup/05-custom.sh b/rootfs/root/docker/setup/05-custom.sh index cef041e..8015086 100755 --- a/rootfs/root/docker/setup/05-custom.sh +++ b/rootfs/root/docker/setup/05-custom.sh @@ -24,7 +24,10 @@ set -o pipefail # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set env variables exitCode=0 - +tor_bin="$(type -p tor)" +for s in server relay bridge hidden; do + cp -Rf tor tor-$s +done # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Predefined actions [ -f "/etc/privoxy/trust.new" ] && mv -f /etc/privoxy/trust.new /etc/privoxy/trust diff --git a/rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh b/rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh index de96632..7bd12a5 100755 --- a/rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh +++ b/rootfs/usr/local/etc/docker/init.d/01-tor-bridge.sh @@ -30,7 +30,7 @@ trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SCRIPT_FILE="$0" -SERVICE_NAME="tor" +SERVICE_NAME="tor-bridge" SCRIPT_NAME="$(basename -- "$SCRIPT_FILE" 2>/dev/null)" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # exit if __start_init_scripts function hasn't been Initialized @@ -100,7 +100,7 @@ SERVICE_UID="0" # set the user id SERVICE_GID="0" # set the group id # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # execute command variables - keep single quotes variables will be expanded later -EXEC_CMD_BIN='tor' # command to execute +EXEC_CMD_BIN='tor-bridge' # command to execute EXEC_CMD_ARGS='-f $CONF_DIR/bridge.conf' # command arguments EXEC_PRE_SCRIPT='' # execute script before # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/init.d/01-tor-hidden.sh b/rootfs/usr/local/etc/docker/init.d/01-tor-hidden.sh index 8196178..6e157a7 100755 --- a/rootfs/usr/local/etc/docker/init.d/01-tor-hidden.sh +++ b/rootfs/usr/local/etc/docker/init.d/01-tor-hidden.sh @@ -30,7 +30,7 @@ trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SCRIPT_FILE="$0" -SERVICE_NAME="tor" +SERVICE_NAME="tor-hidden" SCRIPT_NAME="$(basename -- "$SCRIPT_FILE" 2>/dev/null)" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # exit if __start_init_scripts function hasn't been Initialized @@ -100,7 +100,7 @@ SERVICE_UID="0" # set the user id SERVICE_GID="0" # set the group id # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # execute command variables - keep single quotes variables will be expanded later -EXEC_CMD_BIN='tor' # command to execute +EXEC_CMD_BIN='tor-hidden' # command to execute EXEC_CMD_ARGS='-f $CONF_DIR/hidden.conf' # command arguments EXEC_PRE_SCRIPT='' # execute script before # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/init.d/01-tor-relay.sh b/rootfs/usr/local/etc/docker/init.d/01-tor-relay.sh index e4fcf64..54bf558 100755 --- a/rootfs/usr/local/etc/docker/init.d/01-tor-relay.sh +++ b/rootfs/usr/local/etc/docker/init.d/01-tor-relay.sh @@ -30,7 +30,7 @@ trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SCRIPT_FILE="$0" -SERVICE_NAME="tor" +SERVICE_NAME="tor-relay" SCRIPT_NAME="$(basename -- "$SCRIPT_FILE" 2>/dev/null)" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # exit if __start_init_scripts function hasn't been Initialized @@ -100,7 +100,7 @@ SERVICE_UID="0" # set the user id SERVICE_GID="0" # set the group id # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # execute command variables - keep single quotes variables will be expanded later -EXEC_CMD_BIN='tor' # command to execute +EXEC_CMD_BIN='tor-relay' # command to execute EXEC_CMD_ARGS='-f $CONF_DIR/relay.conf' # command arguments EXEC_PRE_SCRIPT='' # execute script before # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/init.d/01-tor-server.sh b/rootfs/usr/local/etc/docker/init.d/01-tor-server.sh index f13500a..5ab680a 100755 --- a/rootfs/usr/local/etc/docker/init.d/01-tor-server.sh +++ b/rootfs/usr/local/etc/docker/init.d/01-tor-server.sh @@ -30,7 +30,7 @@ trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SCRIPT_FILE="$0" -SERVICE_NAME="tor" +SERVICE_NAME="tor-server" SCRIPT_NAME="$(basename -- "$SCRIPT_FILE" 2>/dev/null)" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # exit if __start_init_scripts function hasn't been Initialized @@ -100,7 +100,7 @@ SERVICE_UID="0" # set the user id SERVICE_GID="0" # set the group id # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # execute command variables - keep single quotes variables will be expanded later -EXEC_CMD_BIN='tor' # command to execute +EXEC_CMD_BIN='tor-server' # command to execute EXEC_CMD_ARGS='-f $CONF_DIR/torrc' # command arguments EXEC_PRE_SCRIPT='' # execute script before # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -