Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packaging/centos/datadog-agent.init
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ restart() {
start
}

condrestart() {
if [ -f "$LOCKFILE" ]; then
restart
fi
}

info() {
shift # Shift 'info' out of the args so we can pass any
# additional options to the real command
Expand Down Expand Up @@ -216,6 +222,10 @@ case "$1" in
restart
;;

condrestart|try-reload)
condrestart
;;

status)
# Note: sh does not support arrays
# Check for kernel version 3.18+ - overlayfs has known bug affecting unix domain sockets
Expand Down
8 changes: 8 additions & 0 deletions packaging/debian/datadog-agent.init
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ case "$1" in
$0 start
;;

condrestart|try-reload)
check_status essential > /dev/null
if [ $? -eq 0 ]; then
$0 stop
$0 start
fi
;;

configcheck)
su $AGENTUSER -c "$AGENTPATH configcheck"
exit $?
Expand Down