-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_pierced.sh
More file actions
executable file
·44 lines (39 loc) · 1 KB
/
run_pierced.sh
File metadata and controls
executable file
·44 lines (39 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
stfdir=/sibcb2/bioinformatics2/chenyulong/software/pierced/linux
ip=10.42.1.64
port=8080
name=chenyulong
function usage {
echo
echo "Usage:"
echo " bash $0 [options]"
echo "Description:"
echo " the script is used to Mapping a local area network to a public network by pierced."
echo " -i/--ip ip -- ip address, [default: $ip]."
echo " -p/--port port -- port number, [default: $port]."
echo " -n/--name name -- the prefix of output network name, [default: '$name']."
echo " -h/--help -- show help message."
echo
exit 0
}
ARG=$(getopt -q -o hi:p:n: --long help,ip:port:name: -n $0 -- $@)
eval set -- $ARG
while [ -n "$1" ];do
case "$1" in
-i|--ip)
ip=$2;shift 2;;
-p|--port)
port=$2;shift 2;;
-n|--name)
name=$2;shift 2;;
-h|--help)
help=true;shift 1;;
*)
break;;
esac
done
if [[ $help == 'true' ]];then
usage
else
$stfdir/ding -config=$stfdir/ding.cfg -subdomain=$name $ip:$port
fi