@@ -108,13 +108,38 @@ check_dependencies() {
108
108
echo " INFO: All required packages are installed"
109
109
}
110
110
111
+ # Clean VOCMS-specific crontabs
112
+ _clean_crontab_vocms () {
113
+ FLAVOR=" ${SPECIAL_HOSTS[$HOST]} "
114
+ if [ -z " $FLAVOR " ]; then
115
+ echo " INFO: Not a vocms machine, not cleaning vocms crontabs"
116
+ return
117
+ fi
118
+ crontab -l 2> /dev/null | grep -v " $INSTALLATION_DIR /current/config/admin/kinit.sh" | crontab -
119
+ }
120
+
111
121
# Remove existing DQMGUI cronjobs
112
122
clean_crontab () {
113
123
# Filter cronjobs starting in $INSTALLATION_DIR/current/dqmgui and
114
124
# replace crontabs
115
125
crontab -l 2> /dev/null | grep -v " HOME=/tmp" | grep -v " $INSTALLATION_DIR /current/config/dqmgui" | grep -vE " $INSTALLATION_DIR /current.+logrotate.conf" | crontab -
116
126
}
117
127
128
+ # Crontabs specific to VOCMS
129
+ _install_crontab_vocms () {
130
+ FLAVOR=" ${SPECIAL_HOSTS[$HOST]} "
131
+ if [ -z " $FLAVOR " ]; then
132
+ echo " INFO: Not a vocms machine, not installing vocms crontabs"
133
+ return
134
+ fi
135
+ (
136
+ crontab -l # Get existing crontabs
137
+ # Adding kinit script for EOS
138
+ echo " */6 * * * * $INSTALLATION_DIR /current/config/admin/kinit.sh"
139
+ echo " @reboot $INSTALLATION_DIR /current/config/admin/kinit.sh"
140
+ ) | crontab -
141
+ }
142
+
118
143
# Install DQMGUI cronjobs
119
144
install_crontab () {
120
145
_create_logrotate_conf
@@ -125,11 +150,12 @@ install_crontab() {
125
150
echo " HOME=/tmp" # Workaround for P5, where the home dir is an NFS mount and isn't immediately available.
126
151
echo " @reboot (sleep 30 && $INSTALLATION_DIR /current/config/dqmgui/manage sysboot)"
127
152
) | crontab -
153
+ _install_crontab_vocms
128
154
}
129
155
130
156
# Clean acrontabs for Offline/RelVal/Dev GUI
131
157
clean_acrontab () {
132
- FLAVOR=" ${SPECIAL_HOSTS[$HOST]} " # TODO: Get flavor
158
+ FLAVOR=" ${SPECIAL_HOSTS[$HOST]} "
133
159
if [ -z " $FLAVOR " ]; then
134
160
echo " INFO: Not a vocms machine, not cleaning acrontabs"
135
161
return
@@ -306,8 +332,9 @@ extract_dmwm() {
306
332
307
333
install_dmwm () {
308
334
# Move dqmgui-related scripts from DMWM to the config folder
309
- rm -rf " $INSTALLATION_DIR /$DMWM_GIT_TAG /config/dqmgui" # Cleanup dir if exists
310
- mv " $DMWM_TMP_DIR /dqmgui" " $INSTALLATION_DIR /$DMWM_GIT_TAG /config/dqmgui"
335
+ rm -rf " $INSTALLATION_DIR /$DMWM_GIT_TAG /config/dqmgui" # Cleanup dir if exists
336
+ mv " $DMWM_TMP_DIR /dqmgui" " $INSTALLATION_DIR /$DMWM_GIT_TAG /config/dqmgui" # DQMGUI Layouts
337
+ mv " $DMWM_TMP_DIR /admin" " $INSTALLATION_DIR /$DMWM_GIT_TAG /config/admin" # Needed for kinit.sh
311
338
rm -rf $DMWM_TMP_DIR
312
339
}
313
340
0 commit comments