#!/bin/bash

UPDATER_DIR="/home/iont.tech/updater"

sudo echo "Starting firmware service" | sudo tee -a "$UPDATER_DIR/update.log"

sudo systemctl restart firmware.service

if [ $? -eq 0 ]; then
    sudo echo "Service restarted" | sudo tee -a "$UPDATER_DIR/update.log"
else
    sudo echo "Failed to restart service" | sudo tee -a "$UPDATER_DIR/update.log"
fi
