Last active
February 9, 2022 15:16
-
-
Save richard24se/c41d7edde19ccb87ef8d1083822d4e26 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
BASE=docker | |
# modify these in /etc/default/$BASE (/etc/default/docker) | |
DOCKERD=/usr/bin/dockerd | |
# This is the pid file managed by docker itself | |
DOCKER_PIDFILE=/var/run/$BASE.pid | |
# This is the pid file created/managed by start-stop-daemon | |
DOCKER_SSD_PIDFILE=/var/run/$BASE-ssd.pid | |
DOCKER_LOGFILE=/var/log/$BASE.log | |
DOCKER_OPTS= | |
DOCKER_DESC="Docker"| | |
if ! pgrep "dockerd" > /dev/null | |
then | |
echo "starting docker..." | |
sudo start-stop-daemon --start --background \ | |
--exec "$DOCKERD" \ | |
--pidfile "$DOCKER_SSD_PIDFILE" \ | |
--make-pidfile \ | |
-- \ | |
-p "$DOCKER_PIDFILE" \ | |
$DOCKER_OPTS \ | |
#>> "$DOCKER_LOGFILE" 2>&1 | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment