|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
[ -f /etc/profile.d/10-java-caching-proxy.sh ] && . /etc/profile.d/10-java-caching-proxy.sh
|
|
|
|
|
|
|
|
|
|
function showhelp {
|
|
|
|
|
echo -e "\nusage: clean-container-state [-g <ghn_home>] [-s <fileName>] [-h] \n"
|
|
|
|
@ -43,10 +44,10 @@ source "$ghnhome"/scripts/load-env "$ghnhome"
|
|
|
|
|
|
|
|
|
|
RETVAL=
|
|
|
|
|
if [ -z "$filename" ]; then
|
|
|
|
|
java org.gcube.smartgears.utils.sweeper.ContainerSweeperClient -G"$ghnhome" 1>/home/gcube/SmartGears/containerState.log
|
|
|
|
|
java $JAVA_OPTS org.gcube.smartgears.utils.sweeper.ContainerSweeperClient -G"$ghnhome" 1>/home/gcube/SmartGears/containerState.log
|
|
|
|
|
RETVAL=$?
|
|
|
|
|
else
|
|
|
|
|
java org.gcube.smartgears.utils.sweeper.ContainerSweeperClient $filename -G"$ghnhome" 1>/home/gcube/SmartGears/containerState.log
|
|
|
|
|
java $JAVA_OPTS org.gcube.smartgears.utils.sweeper.ContainerSweeperClient $filename -G"$ghnhome" 1>/home/gcube/SmartGears/containerState.log
|
|
|
|
|
RETVAL=$?
|
|
|
|
|
if [ $RETVAL -eq 0 ] ; then
|
|
|
|
|
echo -e "\nvolatile state saved in $ghnhome/$filename"
|
|
|
|
|