Spotter-VM/mifosx/etc/init.d/mifosx

31 lines
547 B
Plaintext
Executable File

#!/sbin/openrc-run
description="Mifos X docker container"
depend() {
need docker mariadb postfix
}
start() {
/usr/bin/docker run -d --rm \
--name mifosx \
-h mifosx \
--link mariadb \
--link postfix \
-v /srv/mifosx/conf/server.xml:/srv/tomcat/conf/server.xml \
-v /srv/mifosx/conf/context.xml:/srv/tomcat/webapps/fineract-provider/META-INF/context.xml \
mifosx
}
start_post() {
/usr/bin/spotter-appmgr register-proxy mifosx
}
stop_pre() {
/usr/bin/spotter-appmgr unregister-proxy mifosx
}
stop() {
/usr/bin/docker stop mifosx
}