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

30 lines
498 B
Plaintext
Raw Normal View History

2018-04-21 22:30:25 +02:00
#!/sbin/openrc-run
description="Crisis Cleanup docker container"
depend() {
need docker postfix postgres
}
start() {
/usr/bin/docker run -d --rm \
--name crisiscleanup \
-h crisiscleanup \
--link postfix \
--link postgres \
-v /srv/crisiscleanup/conf:/srv/crisiscleanup/config \
crisiscleanup
}
start_post() {
/usr/bin/spotter-appmgr register-proxy crisiscleanup
}
stop_pre() {
/usr/bin/spotter-appmgr unregister-proxy crisiscleanup
}
stop() {
/usr/bin/docker stop crisiscleanup
}