@@ -264,11 +264,11 @@ runAgent(){
264
264
then
265
265
if [ ! " $( docker ps -a -f " name=$AI " --format ' {{.Names}}' ) " ]
266
266
then
267
- echo " INFO: Starting new container using network mode $NETWORK "
267
+ echo " INFO: Starting new container. "
268
268
if [ -f " $CONFDIR " /config.properties ]; then
269
- docker run -d --network " $NETWORK " -- env-file " $CONFDIR " /config.properties -v " $PV " :/app --group-add " $groupId " --name " $AI " " $imageName "
269
+ docker run -d --env-file " $CONFDIR " /config.properties -v " $PV " :/app --group-add " $groupId " --name " $AI " " $imageName "
270
270
else
271
- docker run -d --network " $NETWORK " - v " $PV " :/app --group-add " $groupId " --name " $AI " " $imageName "
271
+ docker run -d -v " $PV " :/app --group-add " $groupId " --name " $AI " " $imageName "
272
272
fi
273
273
docker exec " $AI " /bin/bash -c ' agent ido validate --config /app/data/conf/config.json; if [[ "$?" != "0" ]] ; then echo VALIDATE_FAILED > /app/data/conf/status.txt; else echo VALIDATE_SUCCESS > /app/data/conf/status.txt; fi ;'
274
274
validateStatus=$( cat " $CONFDIR " /status.txt)
@@ -312,11 +312,11 @@ runAgent(){
312
312
then
313
313
if [ ! " $( podman ps -a -f " name=$AI " --format ' {{.Names}}' ) " ]
314
314
then
315
- echo " INFO: Starting new container using network mode $NETWORK "
315
+ echo " INFO: Starting new container. "
316
316
if [ -f " $CONFDIR " /config.properties ]; then
317
- podman run -d --network " $NETWORK " -- env-file " $CONFDIR " /config.properties -v " $PV " :/app --group-add " $groupId " --name " $AI " " $imageName "
317
+ podman run -d --env-file " $CONFDIR " /config.properties -v " $PV " :/app --group-add " $groupId " --name " $AI " " $imageName "
318
318
else
319
- podman run -d --network " $NETWORK " - v " $PV " :/app --group-add " $groupId " --name " $AI " " $imageName "
319
+ podman run -d -v " $PV " :/app --group-add " $groupId " --name " $AI " " $imageName "
320
320
fi
321
321
322
322
podman exec " $AI " /bin/bash -c ' agent ido validate --config /app/data/conf/config.json; if [[ "$?" != "0" ]] ; then echo VALIDATE_FAILED > /app/data/conf/status.txt; else echo VALIDATE_SUCCESS > /app/data/conf/status.txt; fi ;'
@@ -692,10 +692,6 @@ start()
692
692
if [ -f " $configOverride " ]; then
693
693
kill
694
694
fi
695
- if [ " $NETWORK " = " " ];
696
- then
697
- NETWORK=" host"
698
- fi
699
695
runAgent
700
696
echo " "
701
697
agentVersion=$( grep agentVersion " $CONFDIR " /config.json | awk ' { print $2 }' | sed ' s/,//g' )
@@ -1034,8 +1030,6 @@ Help()
1034
1030
echo " -ap|--agentpackage No(Required in validate,install
1035
1031
and upgrade) \"\" Agent Package Path"
1036
1032
echo " -c|--config No - Path of the custom config property file"
1037
- echo " -n|--network No host Configuration to change the network type
1038
- of the container runtime."
1039
1033
echo " -pv|--volume Yes - Directory to persist agent data such as
1040
1034
configuration, wallet, logs, etc."
1041
1035
@@ -1101,7 +1095,6 @@ while [ $# -gt 0 ]; do
1101
1095
" -pv" |" --volume" ) createDir " $1 " ; echo PV=" $( cd " $( dirname " $1 " ) " || exit 1; pwd -P) " /" $( basename " $1 " ) " >> " $ENV_FILE_TEMP " ; shift ;;
1102
1096
" -h" |" --help" ) Help; exit 1;;
1103
1097
" -ai" |" --agentid" ) echo AI=" $1 " >> " $ENV_FILE_TEMP " ; shift ;;
1104
- " -n" |" --network" ) echo NETWORK=" $1 " >> " $ENV_FILE_TEMP " ; shift ;;
1105
1098
" -au" |" --autoupgrade" ) echo AU=" $1 " >> " $ENV_FILE_TEMP " ; shift ;;
1106
1099
" -ap" |" --agentpackage" ) echo AP=" $( cd " $( dirname " $1 " ) " || exit 1; pwd -P) " /" $( basename " $1 " ) " >> " $ENV_FILE_TEMP " ; shift ;;
1107
1100
" -c" |" --config" ) configOverride=$( cd " $( dirname " $1 " ) " || exit 1; pwd -P) /$( basename " $1 " ) ; shift ;;
0 commit comments