Skip to content

Instantly share code, notes, and snippets.

@yoshimov
Created November 17, 2014 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoshimov/045a2a98eeee7dc7a209 to your computer and use it in GitHub Desktop.
Save yoshimov/045a2a98eeee7dc7a209 to your computer and use it in GitHub Desktop.
Docker startup shell script for init
#!/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