2018-03-25 14:37:57 +02:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
description="OpenDataKit Aggregate docker container"
|
|
|
|
|
|
|
|
depend() {
|
|
|
|
need docker net postgres
|
|
|
|
use dns logger netmount postfix
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
/usr/bin/docker run -d --rm \
|
|
|
|
--name odk \
|
|
|
|
-h odk \
|
|
|
|
--link postfix \
|
|
|
|
--link postgres \
|
|
|
|
-v /srv/odk/conf/server.xml:/srv/tomcat/conf/server.xml \
|
|
|
|
-v /srv/odk/conf/jdbc.properties:/srv/tomcat/webapps/aggregate/WEB-INF/classes/jdbc.properties \
|
|
|
|
-v /srv/odk/conf/security.properties:/srv/tomcat/webapps/aggregate/WEB-INF/classes/security.properties \
|
|
|
|
odk
|
|
|
|
}
|
|
|
|
|
|
|
|
start_post() {
|
2018-03-26 21:12:48 +02:00
|
|
|
/usr/local/bin/spotter-appmgr update-proxy odk
|
2018-03-25 14:37:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
|
|
|
/usr/bin/docker stop odk
|
|
|
|
}
|