name | data type | type | namespace | min/max occurs | description |
---|---|---|---|---|---|
script | string | element | 0/1 | The script contents with new lines replace by '\n' | |
Properties inherited from execute |
|||||
action | string | element | 0/1 | A referance id used from the servcie to do the provisioning | |
pwd | string | element | 0/1 | Not used. It's there for backwards compatibility. | |
user | string | element | 0/1 | Not used. It's there for backwards compatibility. |
Example
<confScript> <script>#!/bin/bash\n\nlogstashScript=/root/runLogstash.sh\nscreen -S logstash -dm /bin/bash "$logstashScript"\n\n\nlogLevelPath=/root/\nlogLevelFile=$logLevelPath/logstash_loglevel.csv\nremotePath=/media/lobcder/skoulouz/\nremoteLogPath=$remotePath/logs\nlocalLogPath=/root/logs\n\nmkdir $localLogPath\n\n\nfor logArchPath in $remoteLogPath/*.gz; do\n echo "File -> $logArchPath"\n if [ ! -f $logArchPath.lock ]; then\n touch $logArchPath.lock\n cp $logArchPath $localLogPath\n logArchName=$(basename $logArchPath)\n tar -xvf $localLogPath/$logArchName -C $localLogPath\n sleep 120\n modTime=-100\n while [ ! -f $logLevelFile ]\n do\n sleep 5\n done\n while [ $modTime -lt 120 ]\n do\n moddate=$(stat -c %Y $logLevelFile)\n moddate=${moddate%% *}\n now=$(date +%s)\n modTime="$(( $now - $moddate))"\n echo $modTime\n sleep 5\n done\n rm $localLogPath/*.tar.gz\n rm $localLogPath/*.log\n modTime=-100\n fi\ndone\n \n\nscreen -X -S logstash quit\nsleep 5\n\nuid=`ifconfig | grep eth0 | awk '{print $NF}' | sed 's/://g'`\n\nfor csvFiles in $logLevelPath/*.csv; do\n echo $csvFiles $csvFiles$uid.csv\n mv $csvFiles $csvFiles$uid.csv\n cp $csvFiles$uid.csv $remotePath\ndone\n\nkillall java \n</script> <user>user</user> <pwd>123</pwd> <action>58c2c2f3a8d4b56889878d03</action> </confScript>