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

29 lines
463 B
Plaintext
Executable File

#!/sbin/openrc-run
description="OpenMapKit docker container"
depend() {
need docker
}
start() {
/usr/bin/docker run -d --rm \
--name openmapkit \
-h openmapkit \
-v /srv/openmapkit/conf/settings.js:/srv/openmapkit/settings.js \
-v /srv/openmapkit/data:/srv/openmapkit/data \
openmapkit
}
start_post() {
/usr/bin/vmmgr register-proxy openmapkit
}
stop_pre() {
/usr/bin/vmmgr unregister-proxy openmapkit
}
stop() {
/usr/bin/docker stop openmapkit
}