diff --git a/ssh-tunnel-manager.conf.example b/ssh-tunnel-manager.conf.example index f43c788011566cca6153feb4169380f6b3bf4c61..c4409358e3654d989125ddce14597e57b61a8f75 100644 --- a/ssh-tunnel-manager.conf.example +++ b/ssh-tunnel-manager.conf.example @@ -40,6 +40,14 @@ # "" #) +# +# The SOCKETS_PERMS array is used to configure permissions for forwarded sockets. +# +#SOCKETS_PERMS=( +# "" +# "" +#) + # # The RECONNECT_TIMER is used in case of a tunnel connection to be lost. After # the script is detecting that the connection was lost, the time defines the diff --git a/ssh-tunnel-manager.sh b/ssh-tunnel-manager.sh index 664ca0d7f5e75e64daeb45c3643f7f250c6766c0..7924f6e4e8e4a7b3c8bbb5804cf3cf584afbc5d5 100755 --- a/ssh-tunnel-manager.sh +++ b/ssh-tunnel-manager.sh @@ -428,6 +428,10 @@ case $COMMAND in [ "$DBG" -gt "0" ] && echotime "START - *** DBG-CMD: ps aux | grep -v grep | grep \"$0 --config $CONFIG_FILE manage $idx\" | awk '{print \$2}'" echotime "START - Starting tunnel '${TUNNEL_NAMES[$idx]}' (ID $idx) ... PID: $RESULT_PID" echo "Starting tunnel '${TUNNEL_NAMES[$idx]}' ... Done" + + if [ -e "${SOCKETS[$idx]}" ]; then + chmod ${SOCKETS_PERMS[$idx]} ${SOCKETS[$idx]} + fi fi # sleep before every cycle to aviod overloading done