T06 · System Persistence
- Location
scripts/install.sh:232- Finding
System-Wide Persistence Is Created During the Default Installation Flow
- Content
View full analysis
"$service_file" << EOF [Unit] Description=OpenClaw Dialog Manager Skill After=network.target [Service] Type=simple User=$USER WorkingDirectory=$(pwd) ExecStart=$(which node) start-dialog-manager.js Restart=on-failure RestartSec=10 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target EOF if [ $? -eq 0 ]; then log_success "服务文件已创建: $service_file" log_info "使用以下命令启用服务:" echo " sudo systemctl enable openclaw-dialog-manager.service" echo " sudo systemctl start openclaw-dialog-manager.service" fi else log_info "系统服务目录不存在,跳过服务文件创建" fi } ``` The default installation flow invokes this function without a separate service-installation option: ```bash check_dependencies install_dependencies create_configs register_skill create_startup_script create_service_file ``` The quick-start guide then instructs the user to enable boot persistence: ```bash # 方式2:作为服务启动(需要systemd) sudo systemctl enable openclaw-dialog-manager.service sudo systemctl start openclaw-dialog-manager.service ``` ### Technical Analysis The installer unconditionally calls `create_service_file()`. If it runs with permission to write into `/etc/systemd/system`, it creates a system-wide service definition pointing to the current, potentially mutable project directory. Continuous background execution is related to the declared monitoring function, but a system-wide service is not the minimum privil ...[truncated 1762 chars]- Remediation
View remediation
