QuestionQ187

Automation

Question Image

Refer to the exhibit. A developer must create a Bash script that performs a Chef Client reload after a system reset. Which command completes the script?

  • A killproc -n $pidfile $exec -SIGHUP
  • B killproc -pi $pidfile $exec -HUP
  • C killproc -p $pidfile $exec -HUP
  • D killproc -n $pidfile $exec -HUP
Explanation

killproc uses -p to identify the process by its PID file. Supplying $pidfile with -p, followed by the Chef Client executable and -HUP, sends SIGHUP to that recorded process, which is the reload signal used by this init-script action.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!