2018-01-23 18:18:46 +01:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
|
|
|
|
description="Motech docker container"
|
|
|
|
|
|
|
|
depend() {
|
2018-04-29 20:48:57 +02:00
|
|
|
need docker activemq postfix postgres
|
2018-01-23 18:18:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
2018-01-27 14:08:19 +01:00
|
|
|
/usr/bin/docker run -d --rm \
|
|
|
|
--name motech \
|
|
|
|
-h motech \
|
|
|
|
--link activemq \
|
2018-02-03 13:19:24 +01:00
|
|
|
--link postfix \
|
2018-01-27 14:08:19 +01:00
|
|
|
--link postgres \
|
|
|
|
-v /srv/motech/conf:/srv/tomcat/.motech \
|
|
|
|
motech
|
2018-01-23 18:18:46 +01:00
|
|
|
}
|
|
|
|
|
2018-03-25 23:13:55 +02:00
|
|
|
start_post() {
|
2018-04-29 20:48:57 +02:00
|
|
|
/usr/bin/spotter-appmgr register-proxy motech
|
|
|
|
}
|
|
|
|
|
|
|
|
stop_pre() {
|
|
|
|
/usr/bin/spotter-appmgr unregister-proxy motech
|
2018-03-25 23:13:55 +02:00
|
|
|
}
|
|
|
|
|
2018-01-23 18:18:46 +01:00
|
|
|
stop() {
|
|
|
|
/usr/bin/docker stop motech
|
|
|
|
}
|