2018-01-26 21:25:03 +01:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
description="Sigmah docker container"
|
|
|
|
|
|
|
|
depend() {
|
2018-04-29 20:48:57 +02:00
|
|
|
need docker postfix postgres
|
2018-01-26 21:25:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
/usr/bin/docker run -d --rm \
|
|
|
|
--name sigmah \
|
|
|
|
-h sigmah \
|
2018-02-03 15:17:11 +01:00
|
|
|
--link postfix \
|
2018-01-26 21:25:03 +01:00
|
|
|
--link postgres \
|
|
|
|
-v /srv/sigmah/data:/srv/sigmah/data \
|
|
|
|
-v /srv/sigmah/conf/persistence.xml:/srv/tomcat/webapps/sigmah/WEB-INF/classes/META-INF/persistence.xml \
|
|
|
|
-v /srv/sigmah/conf/sigmah.properties:/srv/tomcat/webapps/sigmah/WEB-INF/classes/sigmah.properties \
|
|
|
|
sigmah
|
|
|
|
}
|
|
|
|
|
2018-03-25 23:21:24 +02:00
|
|
|
start_post() {
|
2018-09-04 21:42:26 +02:00
|
|
|
/usr/bin/vmmgr register-proxy sigmah
|
2018-04-29 20:48:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
stop_pre() {
|
2018-09-04 21:42:26 +02:00
|
|
|
/usr/bin/vmmgr unregister-proxy sigmah
|
2018-03-25 23:21:24 +02:00
|
|
|
}
|
|
|
|
|
2018-01-26 21:25:03 +01:00
|
|
|
stop() {
|
|
|
|
/usr/bin/docker stop sigmah
|
|
|
|
}
|