Article 5P2GM Daemon lxd-client client is not running

Daemon lxd-client client is not running

by
gustav3000
from LinuxQuestions.org on (#5P2GM)
I have a problem with my init service. After I started the service lxd-agent I tried to check its status. I can see in the output of /etc/rc.d/rc.lxd-agent status below message:

Code:daemon: lxd-agent is running (pid 3351) (client is not running)Command lxc exec slackware-vm -- sudo -i redirects me into the proper bash shell. Can I just ignore the above message complaining about that client is not running and everything will work fine? daemon is the following program: http://libslack.org/daemon/.

Here's my /etc/rc.d/rc.lxd-agent script:

Code:#!/bin/sh

PRGNAM="lxd-agent"
BIN="/run/lxd_config/drive/lxd-agent"
PID="/run"
CHDIR="/run/lxd_config/drive"

lxd_agent_start() {
if /usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}"; then
echo "${PRGNAM} is already running."
else
echo -n "Starting ${PRGNAM}..."
/usr/bin/daemon --respawn --name "${PRGNAM}" --pidfiles "${PID}" \
--chdir "${CHDIR}" -- "${BIN}"
echo "done."
fi
}

lxd_agent_stop() {
if /usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}"; then
echo -n "Stopping ${PRGNAM}..."
/usr/bin/daemon --stop --name "${PRGNAM}" --pidfiles "${PID}"
echo "done."
else
echo "${PRGNAM} is not running."
fi
}

lxd_agent_restart() {
if /usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}"; then
echo -n "Restarting ${PRGNAM}..."
/usr/bin/daemon --restart --name "${PRGNAM}" --pidfiles "${PID}"
echo "done."
else
echo "${PRGNAM} is not running."
exit 1
fi
}

lxd_agent_status() {
/usr/bin/daemon --running --name "${PRGNAM}" --pidfiles "${PID}" --verbose
}

case $1 in
"start")
lxd_agent_start
;;
"stop")
lxd_agent_stop
;;
"restart")
lxd_agent_restart
;;
"status")
lxd_agent_status
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esaclatest?d=yIl2AUoC8zA latest?i=-wRaZumTHLc:MykN7y9T_Z4:F7zBnMy latest?i=-wRaZumTHLc:MykN7y9T_Z4:V_sGLiP latest?d=qj6IDK7rITs latest?i=-wRaZumTHLc:MykN7y9T_Z4:gIN9vFw-wRaZumTHLc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments