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

27 lines
451 B
Plaintext
Executable File

#!/sbin/openrc-run
description="GNU Health docker container"
depend() {
need docker net postgres
use dns logger netmount postfix
}
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/local/bin/spotter-appmgr update-hosts gnuhealth
}
stop() {
/usr/bin/docker stop gnuhealth
}