Changeset 88 for scripts/usr/local/lib/7dtd/common.sh
- Timestamp:
- Jul 19, 2014, 2:17:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/lib/7dtd/common.sh
r80 r88 188 188 local TEL_PORT=$(getConfigValue $1 TelnetPort) 189 189 local TEL_PASS=$(getConfigValue $1 TelnetPassword) 190 if [ "$TEL_ENABLED" = "true" ] && [ -n "$TEL_PASS" ]; then190 if [ "$TEL_ENABLED" = "true" ]; then 191 191 local TEMPFILE=$(mktemp) 192 192 rm -f $TEMPFILE … … 195 195 nc 127.0.0.1 $TEL_PORT <&3 & 196 196 local NCPID=$! 197 printf "$TEL_PASS\n$2\n" >&3 197 if [ -n "$TEL_PASS" ]; then 198 printf "$TEL_PASS\n$2\n" >&3 199 else 200 printf "$2\n" >&3 201 fi 198 202 sleep ${3:-1} 199 203 printf "exit\n" >&3 … … 203 207 rm -f $TEMPFILE 204 208 else 205 echo "Telnet not enabled or no password set."209 echo "Telnet not enabled." 206 210 fi 207 211 }
Note:
See TracChangeset
for help on using the changeset viewer.