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

33 lines
661 B
Plaintext
Executable File

#!/sbin/openrc-run
description="SAMBRO docker container"
depend() {
need docker postfix postgres
}
start() {
/usr/bin/docker run -d --rm \
--name sambro \
-h sambro \
--link postfix \
--link postgres \
-v /srv/sambro/conf:/srv/web2py/applications/eden/models \
-v /srv/sambro/data/SAMBRO:/srv/web2py/applications/eden/modules/templates/SAMBRO \
-v /srv/sambro/data/databases:/srv/web2py/applications/eden/databases \
-v /srv/sambro/data/uploads:/srv/web2py/applications/eden/uploads \
sahana
}
start_post() {
/usr/bin/vmmgr register-proxy sambro
}
stop_pre() {
/usr/bin/vmmgr unregister-proxy sambro
}
stop() {
/usr/bin/docker stop sambro
}