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

33 lines
661 B
Plaintext
Raw Normal View History

2018-01-28 09:13:30 +01:00
#!/sbin/openrc-run
description="SAMBRO docker container"
depend() {
need docker postfix postgres
2018-01-28 09:13:30 +01:00
}
start() {
/usr/bin/docker run -d --rm \
--name sambro \
-h sambro \
2018-02-03 13:42:32 +01:00
--link postfix \
2018-01-28 09:13:30 +01:00
--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() {
2018-09-04 21:42:26 +02:00
/usr/bin/vmmgr register-proxy sambro
}
stop_pre() {
2018-09-04 21:42:26 +02:00
/usr/bin/vmmgr unregister-proxy sambro
}
2018-01-28 09:13:30 +01:00
stop() {
/usr/bin/docker stop sambro
}