-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b42feb
commit 733dedb
Showing
2 changed files
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
#!/bin/bash | ||
|
||
echo "total args:" $# | ||
echo "first:" $1 | ||
echo "second:" $2 | ||
#echo "total args:" $# | ||
#echo "first:" $1 | ||
#echo "second:" $2 | ||
#sed -i 's/host:".*"/host: "val" /g' /usr/local/apache2/htdocs/iva/conf/conf.js | ||
|
||
# launch command (httpd-foreground) | ||
cmd=$1 | ||
shift | ||
|
||
while [[ $# -gt 0 ]] ;do | ||
case $1 in | ||
for i in "${@}"; do | ||
case $i in | ||
--host=*) | ||
echo host ${1##--host=} | ||
echo "opencga.host = ${1##--host=};" >> /usr/local/apache2/htdocs/iva/conf/conf.js | ||
# exit | ||
echo host ${i##--host=} | ||
echo "opencga.host = ${i##--host=};" >> /usr/local/apache2/htdocs/iva/conf/config.js | ||
shift 2 | ||
;; | ||
-*|--*) | ||
echo "Fatal error. Unknown option $i. " | ||
exit | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
echo CMD"$@" | ||
exec "$@" | ||
exec "$cmd" |