Check container status before running cron jobs

This commit is contained in:
Disassembler 2018-04-09 15:20:20 +02:00
parent 8e7f48339b
commit 883cfce04c
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
4 changed files with 16 additions and 8 deletions

View File

@ -1,4 +1,6 @@
#!/bin/sh
docker exec ckan paster --plugin=ckan tracking update -c /etc/ckan/ckan.ini >/dev/null
docker exec ckan paster --plugin=ckan search-index rebuild -r -c /etc/ckan/ckan.ini >/dev/null
if docker ps | grep -q 'ckan$'; then
docker exec ckan paster --plugin=ckan tracking update -c /etc/ckan/ckan.ini >/dev/null
docker exec ckan paster --plugin=ckan search-index rebuild -r -c /etc/ckan/ckan.ini >/dev/null
fi

View File

@ -1,3 +1,5 @@
#!/bin/sh
docker exec kanboard /srv/kanboard/cli cronjob >/dev/null
if docker ps | grep -q 'kanboard$'; then
docker exec kanboard /srv/kanboard/cli cronjob >/dev/null
fi

View File

@ -1,3 +1,5 @@
#!/bin/sh
docker exec seeddms "cd /srv/seeddms/www/utils/ && /usr/bin/php indexer.php --config ../conf/settings.xml" >/dev/null
if docker ps | grep -q 'seeddms$'; then
docker exec seeddms "cd /srv/seeddms/www/utils/ && /usr/bin/php indexer.php --config ../conf/settings.xml" >/dev/null
fi

View File

@ -1,6 +1,8 @@
#!/bin/sh
docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi dataprovider outgoing' >/dev/null
docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi dataprovider incoming' >/dev/null
docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi savedsearch' >/dev/null
docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi notification queue' >/dev/null
if docker ps | grep -q 'ushahidi$'; then
docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi dataprovider outgoing' >/dev/null
docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi dataprovider incoming' >/dev/null
docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi savedsearch' >/dev/null
docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi notification queue' >/dev/null
fi