Commit 6d712fc5 authored by Maarten Litmaath's avatar Maarten Litmaath
Browse files

v1.13:

- added "condrestart" commands for JAliEn CE and MonALISA;
- made status check after starting a service more robust.
parent 05e3cfcd
......@@ -6,7 +6,7 @@ JAliEn startup scripts are used to control CE and MonaLisa services on VOboxes.
```
Usage: jalien-vobox <Command> [<Service>]
<Command> is one of: start status stop restart mlstatus check
<Command> is one of: start status stop restart condrestart mlstatus check
<Service> is one of: ce monalisa (defaulting to both if not specified)
```
......
#!/bin/bash
# JAliEn VObox Startup Scripts - CE
# v1.12 - 2021-12-20
# v1.13 - 2022-02-07
# Authors:
# Kalana Dananjaya <kwijethu@cern.ch>
# Costin Grigoras <Costin.Grigoras@cern.ch>
......@@ -321,8 +321,15 @@ function start_ce() {
manage_crontab 3-53/10 ce
sleep 3
status_ce
s=3
for i in 1 2 3
do
sleep $s
status_ce && break
[ $i = 3 ] && break
echo Checking again in $s seconds...
done
}
########################################################################################
......@@ -368,6 +375,10 @@ function run_ce() {
sleep 3
start_ce
elif [[ $command = "condrestart" ]]
then
status_ce && run_ce restart
elif [[ $command =~ "status" ]]
then
status_ce $command
......
#!/bin/bash
# JAliEn VObox Startup Scripts - wrapper
# v1.9 - 2021-10-30
# v1.13 - 2022-02-07
# Authors:
# Kalana Dananjaya <kwijethu@cern.ch>
# Costin Grigoras <Costin.Grigoras@cern.ch>
......@@ -18,7 +18,7 @@ dir="$(cd `dirname -- "$0"` &>/dev/null && pwd)"
source $dir/jalien-ce.sh
source $dir/monalisa.sh
cmds='start status stop restart mlstatus check'
cmds='start status stop restart condrestart mlstatus check'
svcs='ce monalisa'
usage()
......
#!/bin/bash
# JAliEn VObox Startup Scripts - MonaLisa
# v1.11 - 2021-11-22
# v1.13 - 2022-02-07
# Authors:
# Kalana Dananjaya <kwijethu@cern.ch>
# Costin Grigoras <Costin.Grigoras@cern.ch>
......@@ -468,8 +468,15 @@ function start_ml(){
manage_crontab 7-57/10 monalisa
sleep 3
status_ml
s=3
for i in 1 2 3
do
sleep $s
status_ml && break
[ $i = 3 ] && break
echo Checking again in $s seconds...
done
}
########################################################################################
......@@ -578,6 +585,10 @@ function run_monalisa() {
sleep $t
start_ml
elif [[ $command = "condrestart" ]]
then
status_ml && run_monalisa restart
elif [[ $command =~ "status" ]]
then
status_ml $command
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment