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

34 lines
514 B
Plaintext
Executable File

#!/sbin/openrc-run
description="CKAN docker container"
depend() {
need docker ckandp postfix postgres redis solr
}
start() {
/usr/bin/docker run -d --rm \
--name ckan \
-h ckan \
--link ckandp \
--link postfix \
--link postgres \
--link redis \
--link solr \
-v /srv/ckan/conf:/etc/ckan \
-v /srv/ckan/data:/srv/ckan/storage \
ckan
}
start_post() {
/usr/bin/spotter-appmgr register-proxy ckan
}
stop_pre() {
/usr/bin/spotter-appmgr unregister-proxy ckan
}
stop() {
/usr/bin/docker stop ckan
}