Improve firestarter status output
This commit is contained in:
parent
3b60400b4d
commit
243da4b2d8
27
firestarter
27
firestarter
@ -149,7 +149,8 @@ fslist() {
|
|||||||
fsstatus() {
|
fsstatus() {
|
||||||
# List statistics about firestarter
|
# List statistics about firestarter
|
||||||
if [ -z "$FIRESTARTER" ]; then
|
if [ -z "$FIRESTARTER" ]; then
|
||||||
error "Firestarter is not currently running" 56
|
printf "\e[31m●\e[0m Not running\n"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Current process status
|
# Current process status
|
||||||
local psline
|
local psline
|
||||||
@ -163,13 +164,35 @@ fsstatus() {
|
|||||||
local displayline
|
local displayline
|
||||||
if [ "$FIRESTARTER_DISPLAY" == "$DISPLAY" ]; then
|
if [ "$FIRESTARTER_DISPLAY" == "$DISPLAY" ]; then
|
||||||
displayline="On display: \e[32m$FIRESTARTER_DISPLAY\e[0m"
|
displayline="On display: \e[32m$FIRESTARTER_DISPLAY\e[0m"
|
||||||
|
elif [ -z "$FIRESTARTER_DISPLAY" ]; then
|
||||||
|
displayline="On display: \e[31mUnset\e[0m"
|
||||||
else
|
else
|
||||||
displayline="On display: \e[31m$FIRESTARTER_DISPLAY\e[0m (currently on $DISPLAY)"
|
displayline="On display: \e[31m$FIRESTARTER_DISPLAY\e[0m (currently on $DISPLAY)"
|
||||||
fi
|
fi
|
||||||
printf "\t$displayline\n"
|
printf "\t$displayline\n"
|
||||||
# Configuration information
|
# Configuration information
|
||||||
if [ -n "$FS_DIEONWM" ] && gettarget "$_optconfigdir/wm"; then
|
if [ -n "$FS_DIEONWM" ]; then
|
||||||
|
if gettarget "$_optconfigdir/wm"; then
|
||||||
printf "\tWill die when \e[34m$_return\e[0m exits\n"
|
printf "\tWill die when \e[34m$_return\e[0m exits\n"
|
||||||
|
else
|
||||||
|
local targeterror=$?
|
||||||
|
local errorline="\t\e[31mFS_DIEONWM is set but"
|
||||||
|
case $targeterror in
|
||||||
|
2)
|
||||||
|
errorline="$errorline wm has no matches"
|
||||||
|
;;
|
||||||
|
50)
|
||||||
|
errorline="$errorline wm is not a Firestarter service"
|
||||||
|
;;
|
||||||
|
51)
|
||||||
|
errorline="$errorline wm is disabled"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
errorline="$errorline wm did not resolve"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
printf "$errorline\n"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
step_preexecute() {
|
step_preexecute() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user