--- name: systemd_local_enable kind: function lang: bash domain: infra version: "1.0.0" purity: impure signature: "systemd_local_enable(name: string) -> json" description: "Habilita un servicio systemd local con systemctl enable para que arranque automáticamente al boot. Requiere sudo." tags: [systemd, service, local, infra, enable] uses_functions: [] uses_types: [] returns: [] returns_optional: false error_type: "error_go_core" imports: [] params: - name: name desc: "nombre del servicio sin sufijo .service" output: "JSON {name, enabled:true}. Errores a stderr, exit 1." tested: false tests: [] test_file_path: "" file_path: "bash/functions/infra/systemd_local_enable.sh" --- ## Ejemplo ```bash source bash/functions/infra/systemd_local_enable.sh systemd_local_enable "sqlite_api" # {"name":"sqlite_api","enabled":true} ``` ## Notas - El unit debe existir en `/etc/systemd/system/` (usar `systemd_local_install_unit` primero). - No arranca el servicio — solo lo habilita para el próximo boot. Usar `systemd_local_start` para lanzarlo ahora.