#!/bin/bash set -euo pipefail systemctl disable --now pigway-pi-control-api.service pigway-pi-control.service 2>/dev/null || true rm -f /etc/systemd/system/pigway-pi-control-api.service rm -f /etc/systemd/system/pigway-pi-control.service rm -f /usr/local/sbin/pigway-pi-control rm -f /usr/local/sbin/pigway-pi-control-api rm -f /etc/pigway-pi-control-api.token rm -rf /usr/local/share/pigway-pi-control systemctl daemon-reload echo "程序已卸载。为防误删自定义内容,配置 /etc/pigway-pi-control.conf 已保留。" echo "如确定不要配置,可手工:sudo rm /etc/pigway-pi-control.conf"