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

30 lines
478 B
Plaintext
Executable File

#!/sbin/openrc-run
description="GNU Health docker container"
depend() {
need docker postfix postgres
}
start() {
/usr/bin/docker run -d --rm \
--name gnuhealth \
-h gnuhealth \
--link postfix \
--link postgres \
-v /srv/gnuhealth/conf:/srv/gnuhealth/gnuhealth/tryton/server/config \
gnuhealth
}
start_post() {
/usr/bin/vmmgr register-proxy gnuhealth
}
stop_pre() {
/usr/bin/vmmgr unregister-proxy gnuhealth
}
stop() {
/usr/bin/docker kill -s SIGINT gnuhealth
}