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 |
| 11 | # |
| 12 | ########################################################################################################## |
| 13 | |
avigaffa | 00e935f | 2017-09-10 08:58:51 +0300 | [diff] [blame] | 14 | OSTYPE=`uname -a | grep -iq ubuntu; echo $?` |
| 15 | echo "${OSTYPE}" |
Michael Lando | 4d97d5f | 2017-06-17 22:40:44 +0300 | [diff] [blame] | 16 | |
shrek2000 | c8a540b | 2017-09-11 15:45:37 +0300 | [diff] [blame] | 17 | if [ ${OSTYPE} -eq 0 ] |
avigaffa | 00e935f | 2017-09-10 08:58:51 +0300 | [diff] [blame] | 18 | then |
| 19 | CONF_FILE_LOCATION="/opt/app/jetty/base/be/config/catalog-be/configuration.yaml" |
| 20 | else |
shrek2000 | c8a540b | 2017-09-11 15:45:37 +0300 | [diff] [blame] | 21 | CONF_FILE_LOCATION="/apps/jetty/base/be/config/catalog-be/configuration.yaml" |
avigaffa | 00e935f | 2017-09-10 08:58:51 +0300 | [diff] [blame] | 22 | fi |
| 23 | echo "Configuration file location: ${CONF_FILE_LOCATION}" |
Michael Lando | 4d97d5f | 2017-06-17 22:40:44 +0300 | [diff] [blame] | 24 | |
talig | f4398a8 | 2017-10-23 09:23:14 +0300 | [diff] [blame] | 25 | java -Dlog.home=/apps/jetty/base/be/logs -Dconfiguration.yaml=${CONF_FILE_LOCATION} -jar openecomp-zusammen-tools-1.2.0-SNAPSHOT.jar org.openecomp.core.tools.main.ZusammenMainTool $1 $2 $3 $4 $5 $6 |
shrek2000 | c8a540b | 2017-09-11 15:45:37 +0300 | [diff] [blame] | 26 | STATUS="${?}" echo "${STATUS}" |