cd /home/${PLC_SLICE_PREFIX}_myops
+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
+
# TODO: add a timeout to eval, that kills children after X seconds
function write_key_command ()
{
key=$1
value=$2
(
- flock -s 200
+ flock -x -w 240 200 2> /dev/null
echo $key : $value >> $LOGFILE
) 200>/var/lock/myops
}
fi
fi
fi
-done < <( curl --silent http://IPADDR/PlanetLabConf/input.cfg )
+done < <( curl $CURL_ARGS -s https://IPADDR/PlanetLabConf/input.cfg )
write_key_value "count" "$count"