summaryrefslogtreecommitdiff
path: root/docker/docker.rc
diff options
context:
space:
mode:
authorMatt Housh <jaeger@crux.ninja>2016-05-25 18:06:12 -0500
committerMatt Housh <jaeger@crux.ninja>2016-05-25 18:06:12 -0500
commit6e49d211ec68adf23a63a6229175ae66ffdff925 (patch)
treee0c1f807e6d7b1dc6c136a885515e1323f809d05 /docker/docker.rc
parent122dee5d73219c2de603dd85681cffe1b28ca496 (diff)
downloadcontrib-6e49d211ec68adf23a63a6229175ae66ffdff925.tar.gz
contrib-6e49d211ec68adf23a63a6229175ae66ffdff925.tar.xz
docker: adopted, updated to version 1.11.1, runc and containerd added as dependencies
Diffstat (limited to 'docker/docker.rc')
-rwxr-xr-xdocker/docker.rc37
1 files changed, 37 insertions, 0 deletions
diff --git a/docker/docker.rc b/docker/docker.rc
new file mode 100755
index 000000000..5aa23e1ae
--- /dev/null
+++ b/docker/docker.rc
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# /etc/rc.d/sshd: start/stop ssh daemon
+#
+
+SSD=/sbin/start-stop-daemon
+PROG=/usr/bin/docker
+PID=/var/run/docker.pid
+OPTS="-p $PID -G docker"
+
+case $1 in
+ start)
+ /usr/bin/cgroupfs-mount
+ $SSD --start --pidfile $PID --background --exec $PROG -- daemon $OPTS
+ ;;
+ stop)
+ $SSD --stop --retry 10 --pidfile $PID
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ status)
+ $SSD --status --pidfile $PID
+ case $? in
+ 0) echo "$PROG is running with pid $(cat $PID)" ;;
+ 1) echo "$PROG is not running but the pid file $PID exists" ;;
+ 3) echo "$PROG is not running" ;;
+ 4) echo "Unable to determine the program status" ;;
+ esac
+ ;;
+ *)
+ echo "usage: $0 [start|stop|restart|status]"
+ ;;
+esac
+
+# End of file

Generated by cgit