git://git.onelab.eu
/
myops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various updates; Add logAxis patch for graphite; Add namespaces to summary scripts.
[myops.git]
/
web
/
collect
/
client
/
update.sh
diff --git
a/web/collect/client/update.sh
b/web/collect/client/update.sh
index
47016ff
..
29a51fe
100644
(file)
--- a/
web/collect/client/update.sh
+++ b/
web/collect/client/update.sh
@@
-7,7
+7,7
@@
else
fi
IP=IPADDR
fi
IP=IPADDR
-DIR=
multiops
+DIR=
PlanetLabConf
FILE=bootstrap.tar.gz
HDIR=/home/${PLC_SLICE_PREFIX}_myops
FILE=bootstrap.tar.gz
HDIR=/home/${PLC_SLICE_PREFIX}_myops
@@
-23,8
+23,14
@@
else
CURL_ARGS=""
fi
CURL_ARGS=""
fi
+if [ -f /usr/boot/myops_cacert.pem ] ; then
+ CURL_ARGS="$CURL_ARGS --cacert /usr/boot/myops_cacert.pem"
+else
+ CURL_ARGS="$CURL_ARGS --insecure"
+fi
+
# if bootstrap file has been updated
# if bootstrap file has been updated
-curl $CURL_ARGS -s -O
--insecure
https://$IP/$DIR/$FILE
+curl $CURL_ARGS -s -O https://$IP/$DIR/$FILE
if [ -f $FILE ] ; then
mod_time_after=`stat -c %Y $FILE`
if [ -f $FILE ] ; then
mod_time_after=`stat -c %Y $FILE`
@@
-36,6
+42,7
@@
if [[ $mod_time_after -gt $mod_time_before ]] ; then
# then an update occurred, and we need to unpack it.
tar -xzf $FILE
chmod 755 ./*.sh ./*.py
# then an update occurred, and we need to unpack it.
tar -xzf $FILE
chmod 755 ./*.sh ./*.py
- ./bootstrap.sh
+ ./bootstrap.sh || exit 1
+ touch $HDIR/update_ok
fi
fi