|
|
@ -67,7 +67,7 @@ _su_cmd() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_get_pid() {
|
|
|
|
_get_pid() {
|
|
|
|
netstat $NS_NOTRIM -ap --protocol=unix 2>$ERROR_TO_DEVNULL \
|
|
|
|
netstat -n $NS_NOTRIM -ap --protocol=unix 2>$ERROR_TO_DEVNULL \
|
|
|
|
| sed -r -e "\|\s${SOCK_DIR}/minion_event_${MINION_ID_HASH}_pub\.ipc$|"'!d; s|/.*||; s/.*\s//;' \
|
|
|
|
| sed -r -e "\|\s${SOCK_DIR}/minion_event_${MINION_ID_HASH}_pub\.ipc$|"'!d; s|/.*||; s/.*\s//;' \
|
|
|
|
| uniq
|
|
|
|
| uniq
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -155,7 +155,7 @@ start() {
|
|
|
|
printf "\nPROCESSES:\n" >&2
|
|
|
|
printf "\nPROCESSES:\n" >&2
|
|
|
|
ps wwwaxu | grep '[s]alt-minion' >&2
|
|
|
|
ps wwwaxu | grep '[s]alt-minion' >&2
|
|
|
|
printf "\nSOCKETS:\n" >&2
|
|
|
|
printf "\nSOCKETS:\n" >&2
|
|
|
|
netstat $NS_NOTRIM -ap --protocol=unix | grep 'salt.*minion' >&2
|
|
|
|
netstat -n $NS_NOTRIM -ap --protocol=unix | grep 'salt.*minion' >&2
|
|
|
|
printf "\nLOG_FILE:\n" >&2
|
|
|
|
printf "\nLOG_FILE:\n" >&2
|
|
|
|
tail -n 20 "$LOG_FILE" >&2
|
|
|
|
tail -n 20 "$LOG_FILE" >&2
|
|
|
|
printf "\nENVIRONMENT:\n" >&2
|
|
|
|
printf "\nENVIRONMENT:\n" >&2
|
|
|
@ -176,7 +176,7 @@ stop() {
|
|
|
|
echo "Service $SERVICE:$MINION_USER:$MINION_ID is not running"
|
|
|
|
echo "Service $SERVICE:$MINION_USER:$MINION_ID is not running"
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo -n "Stopping $SERVICE:$MINION_USER:$MINION_ID daemon: "
|
|
|
|
echo -n "Stopping $SERVICE:$MINION_USER:$MINION_ID daemon: "
|
|
|
|
local pid="$(_get_pid)"
|
|
|
|
local pid="$(_get_pid)"
|
|
|
|
|
|
|
|
|
|
|
|