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