#!/bin/bash

# 定义变量
SERVICE_NAME="iot-local"
SERVICE_FILE="/etc/systemd/system/iot-local.service"

# 关闭服务
echo "stop service"
sudo systemctl stop $SERVICE_NAME

# 删除systemd文件
echo "delete systemd file"
rm -rf $SERVICE_FILE

# 重新加载 systemd 配置
echo "reload systemd"
sudo systemctl daemon-reload