瀏覽代碼

fix the upstart script generated by get.docker.io (it was not starting dockerd on boot)

Jérôme Petazzoni 12 年之前
父節點
當前提交
049d28868e
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      contrib/install.sh

+ 7 - 1
contrib/install.sh

@@ -45,7 +45,13 @@ then
   echo "Upstart script already exists."
   echo "Upstart script already exists."
 else
 else
   echo "Creating /etc/init/dockerd.conf..."
   echo "Creating /etc/init/dockerd.conf..."
-  echo "exec env LANG=\"en_US.UTF-8\" /usr/local/bin/docker -d" > /etc/init/dockerd.conf
+  cat >/etc/init/dockerd.conf <<EOF
+description "Docker daemon"
+start on filesystem or runlevel [2345]
+stop on runlevel [!2345]
+respawn
+exec env LANG="en_US.UTF-8" /usr/local/bin/docker -d
+EOF
 fi
 fi
 
 
 echo "Starting dockerd..."
 echo "Starting dockerd..."