Skip to content

Commit aadcc56

Browse files
committed
Merge pull request QXIP#5 from dougbtv/develop
[bugfix] wrong paths in run.sh for configs & captagent bin
2 parents 9cdd93e + f91b628 commit aadcc56

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

run.sh

+21-18
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@
33
# This runs INSIDE the docker container.
44

55
# Location of captagent.xml
6-
PATH_CAPTAGENT_TRANSPORT_XML=/usr/local/etc/captagent/transport_hep.xml
6+
PATH_CAPTAGENT_TRANSPORT_XML=/usr/local/captagent/etc/captagent/transport_hep.xml
7+
PATH_CAPTAGENT_SOCKET_XML=/usr/local/captagent/etc/captagent/socket_pcap.xml
78

89
# Options, defaults.
910
ETHERNET_DEV=${ETHERNET_DEV:-any}
1011
CAPTURE_HOST=${CAPTURE_HOST:-localhost}
1112
CAPTURE_PORT=${CAPTURE_PORT:-9060}
1213
CAPTURE_ID=${CAPTURE_ID:-2001}
1314
CAPTURE_PASSWORD=${CAPTURE_PASSWORD:-myHep}
14-
CLI_PASSWORD=${CLI_PASSWORD:-12345}
15-
CLI_PORT=${CLI_PORT:-8909}
15+
16+
# Deprecated? Remming out for now...
17+
# CLI_PASSWORD=${CLI_PASSWORD:-12345}
18+
# CLI_PORT=${CLI_PORT:-8909}
19+
# and for reference...
20+
# --clipassword -c CLI password (default: 12345)
21+
# --cliport -o CLI port (default: 8909)
1622

1723
# Show help with --help
1824

@@ -28,8 +34,6 @@ It then kicks off the captagent script in the foreground.
2834
--captureport -p Homer SIP capture port (default: 9060)
2935
--captureid -i Homer capture id (default: 2001)
3036
--capturepassword -w Homer capture password (default: myHep)
31-
--clipassword -c CLI password (default: 12345)
32-
--cliport -o CLI port (default: 8909)
3337
3438
EOF
3539
exit 0;
@@ -60,20 +64,19 @@ while true; do
6064
echo "CAPTURE_ID set to: $CAPTURE_ID";
6165
shift 2 ;;
6266
-w | --capturepassword )
63-
if [ "$2" == "" ]; then show_help; fi;
6467
CAPTURE_PASSWORD=$2;
6568
echo "CAPTURE_PASSWORD set to: $CAPTURE_PASSWORD";
6669
shift 2 ;;
67-
-c | --clipassword )
68-
if [ "$2" == "" ]; then show_help; fi;
69-
CLI_PASSWORD=$2;
70-
echo "CLI_PASSWORD set to: $CLI_PASSWORD";
71-
shift 2 ;;
72-
-o | --cliport )
73-
if [ "$2" == "" ]; then show_help; fi;
74-
CLI_PORT=$2;
75-
echo "CLI_PORT set to: $CLI_PORT";
76-
shift 2 ;;
70+
# -c | --clipassword )
71+
# if [ "$2" == "" ]; then show_help; fi;
72+
# CLI_PASSWORD=$2;
73+
# echo "CLI_PASSWORD set to: $CLI_PASSWORD";
74+
# shift 2 ;;
75+
# -o | --cliport )
76+
# if [ "$2" == "" ]; then show_help; fi;
77+
# CLI_PORT=$2;
78+
# echo "CLI_PORT set to: $CLI_PORT";
79+
# shift 2 ;;
7780
--help )
7881
show_help;
7982
exit 0 ;;
@@ -84,7 +87,7 @@ done
8487

8588
# Replace values in configuration defaults
8689

87-
# perl -p -i -e "s/\{\{ ETHERNET_DEV \}\}/$ETHERNET_DEV/" $PATH_CAPTAGENT_SOCKET_XML
90+
perl -p -i -e "s/eth0/$ETHERNET_DEV/" $PATH_CAPTAGENT_SOCKET_XML
8891

8992
perl -p -i -e "s/127.0.0.1/$CAPTURE_HOST/" $PATH_CAPTAGENT_TRANSPORT_XML
9093
perl -p -i -e "s/9061/$CAPTURE_PORT/" $PATH_CAPTAGENT_TRANSPORT_XML
@@ -96,4 +99,4 @@ perl -p -i -e "s/myHep/$CAPTURE_PASSWORD/" $PATH_CAPTAGENT_TRANSPORT_XML
9699

97100
# Finally, run captagent in foreground.
98101

99-
captagent -n
102+
/usr/local/captagent/bin/captagent -n

0 commit comments

Comments
 (0)