mirror of
https://github.com/webmin/webmin.git
synced 2026-09-14 01:20:38 +01:00
Merge pull request #545 from amishxda/master
add noportcheck to not to check if port is in use
This commit is contained in:
12
setup.sh
12
setup.sh
@@ -363,11 +363,13 @@ else
|
||||
echo ""
|
||||
exit 12
|
||||
fi
|
||||
$perl -e 'use Socket; socket(FOO, PF_INET, SOCK_STREAM, getprotobyname("tcp")); setsockopt(FOO, SOL_SOCKET, SO_REUSEADDR, pack("l", 1)); bind(FOO, pack_sockaddr_in($ARGV[0], INADDR_ANY)) || exit(1); exit(0);' $port
|
||||
if [ $? != "0" ]; then
|
||||
echo "ERROR: TCP port $port is already in use by another program"
|
||||
echo ""
|
||||
exit 13
|
||||
if [ "$noportcheck" = "" ]; then
|
||||
$perl -e 'use Socket; socket(FOO, PF_INET, SOCK_STREAM, getprotobyname("tcp")); setsockopt(FOO, SOL_SOCKET, SO_REUSEADDR, pack("l", 1)); bind(FOO, pack_sockaddr_in($ARGV[0], INADDR_ANY)) || exit(1); exit(0);' $port
|
||||
if [ $? != "0" ]; then
|
||||
echo "ERROR: TCP port $port is already in use by another program"
|
||||
echo ""
|
||||
exit 13
|
||||
fi
|
||||
fi
|
||||
printf "Login name (default admin): "
|
||||
if [ "$login" = "" ]; then
|
||||
|
||||
Reference in New Issue
Block a user