From 0c1471abac484b6b9bcbf0e248583d5f17e8885b Mon Sep 17 00:00:00 2001 From: Doug Le Tough Date: Tue, 25 Jul 2017 12:22:44 +0200 Subject: [PATCH] "test sys_refresh_ref_cron.sh" --- bin/sys_refresh_ref_cron.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sys_refresh_ref_cron.sh b/bin/sys_refresh_ref_cron.sh index f321a38..4a1bdb5 100755 --- a/bin/sys_refresh_ref_cron.sh +++ b/bin/sys_refresh_ref_cron.sh @@ -181,7 +181,7 @@ function refresh_cronjobs REQUEST_ID_PARAMS="host='${VM}' and s_user='${TETALAB_USER}' and minutes='${MINUTES}' and hours='${HOURS}' and days='${DAYS}' and daysofweek='${DAYSOFWEEKS}' and command='${COMMAND}'" RESULT=$(psql -t -h ${DB_HOST} -U ${DB_USER} -d ${DB_DATABASE} -c "select ID from ref_cron where ${REQUEST_ID_PARAMS};") - if [ ${#RESULT} -gt 0 ]; + if [ ${#RESULT} -gt 0 ]; then fct_message "Cronjob not in database, inserting..." REQUEST_INSERT_PARAMS=$(echo ${REQUEST_ID_PARAMS} | sed -s 's/and/,/g') psql -t -h ${DB_HOST} -U ${DB_USER} -d ${DB_DATABASE} -c "insert in ref_cron values (${REQUEST_INSERT_PARAMS});"