47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.9 KiB
2.9 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| install_systemd_service | pipeline | bash | pipelines | 1.0.0 | impure | install_systemd_service --name <N> --exec <PATH> [opts] -> json | Pipeline que registra una app como servicio systemd del sistema: genera el unit, lo instala en /etc/systemd/system/, hace daemon-reload, enable, start y devuelve status. Requiere sudo sin password para systemctl y escritura en /etc/systemd/system/. |
|
|
false | error_go_core |
|
JSON consolidado con subkeys install, enable, start y status de cada paso del pipeline. | false | bash/functions/pipelines/install_systemd_service.sh |
Ejemplo
source bash/functions/pipelines/install_systemd_service.sh
install_systemd_service \
--name sqlite_api \
--exec /home/egutierrez/fn_registry/projects/fn_monitoring/apps/sqlite_api/sqlite_api \
--workdir /home/egutierrez/fn_registry/projects/fn_monitoring/apps/sqlite_api \
--env FN_REGISTRY_ROOT=/home/egutierrez/fn_registry \
--description "fn_registry sqlite_api (read-only HTTP API)"
Salida (resumida):
{
"install": {"name":"sqlite_api","path":"/etc/systemd/system/sqlite_api.service","installed":true},
"enable": {"name":"sqlite_api","enabled":true},
"start": {"name":"sqlite_api","started":true,"pid":12345},
"status": {"name":"sqlite_api","active":"active","sub":"running","enabled":"enabled","pid":12345,"logs":["..."]}
}
Requisitos
systemdactivo en la máquina (en WSL:systemd=trueen/etc/wsl.conf).sudosin password parasystemctly escritura en/etc/systemd/system/.
Notas
- Idempotente: si el unit ya existe, se sobrescribe y systemd se recarga.
- Para desinstalar usar
systemd_local_uninstall <name>. - Orden determinista de Environment= (uno por línea, en el orden pasado en CLI).
- El pipeline NO compila el binario — se asume que
--execapunta a un ejecutable ya listo.