release: v0.2.0
Some checks failed
Release / Build & Release (push) Has been cancelled

Comprehensive release containing structural, UX, and behavioral upgrades since v0.1.0:

1. Namespace Transition: Renamed core executable and project namespaces from 'smart-monitor' to 'smart-shutdown'.
2. Objective Vocabulary Refactoring: Normalized output strings and logging descriptors system-wide to a strict, professional tone.
3. Advanced Status Query: 'status' subcommand now retrieves the parsed configuration, log locations/sizes, and tails the last 10 lines of the local log file.
4. Runtime Configuration Setter: Introduced 'config set' subcommand to modify the configuration file with strict type validations.
5. Auto-System Deployment: Remapped 'install' to clone the executable into system domains and register global PATH variables.
6. Cleaner Removal: 'uninstall' purges binary clones and clears environmental variables, leaving zero traces.
7. Documentation Rewrite: Generated an objective README file featuring copy-paste ready Markdown blocks.
This commit is contained in:
2026-03-24 16:07:22 +08:00
parent 3525a59976
commit 3be3e19e49
10 changed files with 243 additions and 237 deletions

View File

@@ -6,11 +6,9 @@ import (
"smart-shutdown/pkg/logger"
)
// ExecuteShutdown 跨平台执行立即无条件关机
func ExecuteShutdown() error {
logger.Crit("执行系统关机操作!")
logger.Crit("系统调用:执行关机指令")
// 注意:在实际正式环境使用前,如果想防误触可暂时注释掉下方的 `cmd.Run()`
var cmd *exec.Cmd
if runtime.GOOS == "windows" {
cmd = exec.Command("shutdown", "-s", "-f", "-t", "0")