We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e9a7ea commit 1a54bbfCopy full SHA for 1a54bbf
usr/local/sbin/easyengine
@@ -219,9 +219,14 @@ COMMONNGINX()
219
EEMD5SUM
220
221
# White List IP Address
222
- WHITELISTIP=$(w | grep $(echo $SSH_TTY| cut -d'/' -f3,4) | awk '{print($3)}')
223
- if [ ! -z $WHITELISTIP ]
+ IPDETECT=$(w | grep $(echo $SSH_TTY| cut -d'/' -f3,4) | awk '{print($3)}' | grep -v "-")
+ if [ ! -z $IPDETECT ]
224
then
225
+ read -p "Enter The IP Address To Whitelist: [$IPDETECT]: " WHITELISTIP
226
+ if [[ $WHITELISTIP = "" ]]
227
+ then
228
+ WHITELISTIP=$IPDETECT
229
+ fi
230
sed -i "s/deny.*/$(echo "allow $WHITELISTIP;")\ndeny all;/" /etc/nginx/common/acl.conf
231
fi
232
0 commit comments