github.com/tompao/docker@v1.9.1/contrib/host-integration/manager/systemd (about)

     1  #!/bin/sh
     2  set -e
     3  
     4  cid="$1"
     5  auth="$2"
     6  desc="$3"
     7  
     8  cat <<-EOF
     9  	[Unit]
    10  	Description=$desc
    11  	Author=$auth
    12  	After=docker.service
    13  
    14  	[Service]
    15  	ExecStart=/usr/bin/docker start -a $cid
    16  	ExecStop=/usr/bin/docker stop -t 2 $cid
    17  
    18  	[Install]
    19  	WantedBy=local.target
    20  EOF