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

30 lines
480 B
Plaintext
Executable File

#!/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/vmmgr register-proxy crisiscleanup
}
stop_pre() {
/usr/bin/vmmgr unregister-proxy crisiscleanup
}
stop() {
/usr/bin/docker stop crisiscleanup
}