Skip to content

Commit

Permalink
improved stderr handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dmalan committed Jan 29, 2024
1 parent 2237298 commit e293a88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions etc/init.d/docker
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ case "$1" in
;;
stop)
echo "Stopping Docker"
kill -9 $(cat "$SOCAT_PID") 2> /dev/null
kill -9 $(cat "$SOCAT_PID" 2> /dev/null) 2> /dev/null
rm --force "$SOCAT_PID" "$TARGET_SOCKET"
;;
restart)
$0 stop
$0 start
;;
status)
if [[ ! -f "${SOCAT_PID}" ]] || ! ps -p $(cat "$SOCAT_PID") > /dev/null; then
if [[ ! -f "${SOCAT_PID}" ]] || ! ps -p $(cat "$SOCAT_PID" 2> /dev/null) &> /dev/null; then
echo "Docker is not running"
exit 1
else
Expand Down

0 comments on commit e293a88

Please sign in to comment.