LXCize cronjobs
This commit is contained in:
parent
cbaf4d6941
commit
ab82ed3fac
@ -30,7 +30,7 @@ def run_mysql_query(query, database):
|
||||
maria_started = tools.is_service_started('mariadb')
|
||||
if not maria_started:
|
||||
tools.start_service('mariadb')
|
||||
subprocess.run(['docker', 'exec', '-i', 'mariadb', 'mysql', '-e', query, database])
|
||||
subprocess.run(['lxc-attach', 'mariadb', '--', 'mysql', '-e', query, database])
|
||||
if not maria_started:
|
||||
tools.stop_service('mariadb')
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# TODO
|
||||
if docker ps | grep -q 'ckan$'; then
|
||||
lxc-execute ckan -- paster --plugin=ckan tracking update -c /etc/ckan/ckan.ini >/dev/null
|
||||
lxc-execute ckan -- paster --plugin=ckan search-index rebuild -r -c /etc/ckan/ckan.ini >/dev/null
|
||||
# TODO: -u 8003 -g 8003 ?
|
||||
if [ -e /run/openrc/started/ckan ]; then
|
||||
lxc-attach ckan -- paster --plugin=ckan tracking update -c /etc/ckan/ckan.ini >/dev/null
|
||||
lxc-attach ckan -- paster --plugin=ckan search-index rebuild -r -c /etc/ckan/ckan.ini >/dev/null
|
||||
fi
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
if docker ps | grep -q 'kanboard$'; then
|
||||
docker exec kanboard /srv/kanboard/cli cronjob >/dev/null
|
||||
# TODO: -u 8009 -g 8009 ?
|
||||
if [ -e /run/openrc/started/kanboard ]; then
|
||||
lxc-attach kanboard -- /srv/kanboard/cli cronjob >/dev/null
|
||||
fi
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
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
|
||||
# TODO: -u 8010 -g 8010 ?
|
||||
if [ -e /run/openrc/started/seeddms ]; then
|
||||
lxc-attach seeddms -- sh -c "cd /srv/seeddms/www/utils/; php indexer.php --config ../conf/settings.xml" >/dev/null
|
||||
fi
|
||||
|
@ -1,9 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
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
|
||||
docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi webhook send' >/dev/null
|
||||
# TODO: -u 8014 -g 8014 ?
|
||||
if [ -e /run/openrc/started/ushahidi ]; then
|
||||
lxc-attach ushahidi -- sh -c 'cd /srv/ushahidi/platform; bin/ushahidi dataprovider outgoing' >/dev/null
|
||||
lxc-attach ushahidi -- sh -c 'cd /srv/ushahidi/platform; bin/ushahidi dataprovider incoming' >/dev/null
|
||||
lxc-attach ushahidi -- sh -c 'cd /srv/ushahidi/platform; bin/ushahidi savedsearch' >/dev/null
|
||||
lxc-attach ushahidi -- sh -c 'cd /srv/ushahidi/platform; bin/ushahidi notification queue' >/dev/null
|
||||
lxc-attach ushahidi -- sh -c 'cd /srv/ushahidi/platform; bin/ushahidi webhook send' >/dev/null
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user