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