Pas de message d'erreur si la commande status est utilisée alors que le serveur ne tourne pas

This commit is contained in:
Hippolyte Chauvin 2023-05-01 00:17:12 +02:00
parent 0a4fd2cbdc
commit 6ad5e289e1

View file

@ -1,7 +1,7 @@
#!/bin/sh
# cd to the local VNC directory, exit if it fails
cd "${HOME}/.vnc" || exit 6
cd "${HOME}/.vnc" || exit 5
# Variables
file_base="./$(hostname):1."
@ -35,7 +35,7 @@ start() {
if ! is_running; then
vncserver
else
error "The VNC server is already running!" 5
error "The VNC server is already running!" 4
fi
}
@ -44,7 +44,7 @@ status() {
if is_running; then
tail -f "$log_f"
else
error "The VNC server is not running!" 4
echo "The VNC server is not running."
fi
}