Michael Lando | 4d97d5f | 2017-06-17 22:40:44 +0300 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
shrek2000 | c8a540b | 2017-09-11 15:45:37 +0300 | [diff] [blame] | 3 | ########################################################################################################### |
| 4 | # script name - zusammenMainTool.sh |
| 5 | # run script - ./zusammenMainTool.sh |
| 6 | # 1. Export all - ./zusammenMainTool.sh -c EXPORT |
| 7 | # 2. Export one item ./zusammenMainTool.sh -c EXPORT -i ${elementId} |
| 8 | # 3. Import one item - ./zusammenMainTool.sh -c IMPORT -f ${fileName} -i ${elementId} |
| 9 | # 4. Import all - ./zusammenMainTool.sh -c IMPORT -f ${fileName} |
| 10 | # 5. Reset old version - ./zusammenMainTool.sh -c RESET_OLD_VERSION |
ayalaben | 914f3a5 | 2017-11-16 09:21:41 +0200 | [diff] [blame] | 11 | # 6. Heal all - ./zusammenMainTool.sh -c HEAL_ALL -t ${thread number} |
shrek2000 | c8a540b | 2017-09-11 15:45:37 +0300 | [diff] [blame] | 12 | # |
| 13 | ########################################################################################################## |
| 14 | |
avigaffa | 00e935f | 2017-09-10 08:58:51 +0300 | [diff] [blame] | 15 | OSTYPE=`uname -a | grep -iq ubuntu; echo $?` |
| 16 | echo "${OSTYPE}" |
Michael Lando | 4d97d5f | 2017-06-17 22:40:44 +0300 | [diff] [blame] | 17 | |
shrek2000 | c8a540b | 2017-09-11 15:45:37 +0300 | [diff] [blame] | 18 | if [ ${OSTYPE} -eq 0 ] |
avigaffa | 00e935f | 2017-09-10 08:58:51 +0300 | [diff] [blame] | 19 | then |
| 20 | CONF_FILE_LOCATION="/opt/app/jetty/base/be/config/catalog-be/configuration.yaml" |
| 21 | else |
shrek2000 | c8a540b | 2017-09-11 15:45:37 +0300 | [diff] [blame] | 22 | CONF_FILE_LOCATION="/apps/jetty/base/be/config/catalog-be/configuration.yaml" |
avigaffa | 00e935f | 2017-09-10 08:58:51 +0300 | [diff] [blame] | 23 | fi |
| 24 | echo "Configuration file location: ${CONF_FILE_LOCATION}" |
Michael Lando | 4d97d5f | 2017-06-17 22:40:44 +0300 | [diff] [blame] | 25 | |
Gautam Shah | 09a41f5 | 2018-04-11 19:55:29 +0530 | [diff] [blame^] | 26 | java -Dconfig.home=/opt/app/jetty/base/be/config -Dlog.home=/apps/jetty/base/be/logs -Dconfiguration.yaml=${CONF_FILE_LOCATION} -classpath lib/* org.openecomp.core.tools.main.ZusammenMainTool $1 $2 $3 $4 $5 $6 |
shrek2000 | c8a540b | 2017-09-11 15:45:37 +0300 | [diff] [blame] | 27 | STATUS="${?}" echo "${STATUS}" |