Created
November 17, 2014 02:59
-
-
Save yoshimov/045a2a98eeee7dc7a209 to your computer and use it in GitHub Desktop.
Docker startup shell script for init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
### BEGIN INIT INFO | |
# Provides: docker-webdav | |
# Required-Start: $syslog $remote_fs docker | |
# Required-Stop: $syslog $remote_fs docker | |
# Should-Start: | |
# Should-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: WebDAV on Docker | |
# Description: | |
# WebDAV on Docker. | |
### END INIT INFO | |
# first time | |
#docker run -d -p 8090:80 -v /home/hoge/webdav:/site/input --name webdav mpras | |
il/webdav | |
# restart | |
CONTAINER=webdav | |
# restart | |
case "$1" in | |
stop) | |
docker stop $CONTAINER | |
;; | |
status) | |
docker top $CONTAINER | |
;; | |
start|*) | |
docker start $CONTAINER | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment