Skip to content

Commit

Permalink
changes of review
Browse files Browse the repository at this point in the history
Signed-off-by: michaelloercher <[email protected]>
  • Loading branch information
miloit committed Dec 16, 2024
1 parent fa8e9df commit 9e2c6d3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions functions/packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ install_esphomedashboard() {
echo "$(timestamp) [openHABian] Starting ESPHome Dashboard setup..."

# Ensure the script is run with sudo
if [ "$EUID" -ne 0 ]; then
if [ "$EUID" -ne 0 ]; then
echo "$(timestamp) [openHABian] Please run this script as root or with sudo."
return
fi
Expand Down Expand Up @@ -926,13 +926,10 @@ install_esphomedashboard() {
return
fi

if ! systemctl enable esphome-dashboard.service; then
echo "$(timestamp) [openHABian] Error: Failed to enable ESPHome Dashboard service."
return
fi

if ! systemctl start esphome-dashboard.service; then
echo "$(timestamp) [openHABian] Error: Failed to start ESPHome Dashboard service."
# Enable and start the ESPHome Dashboard service
echo "$(timestamp) [openHABian] Enabling and starting the ESPHome Dashboard service..."
if ! systemctl enable --now esphome-dashboard.service; then
echo "$(timestamp) [openHABian] Error: Failed to enable and start ESPHome Dashboard service."
return
fi

Expand Down

0 comments on commit 9e2c6d3

Please sign in to comment.