Fix install function name mismatch for security-dashboard
Confirmed live: setup.sh's run_service() calls install_${name} with
no hyphen-to-underscore conversion, so a hyphenated service name needs
a literally-hyphenated function name (install_security-dashboard, not
install_security_dashboard) to be found at all — got this wrong on
first pass by following CLAUDE.md's own (incorrect) guidance, which
said to convert hyphens to underscores. Every other hyphenated service
in the repo (asterisk-digital-ocean, wolf-pair, mail-archiver,
drum-rhythm-game) already keeps hyphens literal; corrected CLAUDE.md
to match actual practice instead of the other way around.
This commit is contained in:
@@ -17,7 +17,12 @@ checklist per group, and calls `install_<name>()` for each selected item.
|
||||
|
||||
1. Create `services/<name>.sh` (kebab-case filename)
|
||||
2. Call `register_service` at the top of the file
|
||||
3. Define `install_<name>()` (hyphens → underscores in function name)
|
||||
3. Define `install_<name>()` — keep hyphens **literal** in the function name
|
||||
(`install_asterisk-digital-ocean`, not `install_asterisk_digital_ocean`).
|
||||
`setup.sh`'s dispatcher calls `install_${name}` with no hyphen→underscore
|
||||
conversion, so the function name must match the service name exactly.
|
||||
Confirmed live: a mismatched underscore here produces
|
||||
`Service 'x' has no install_x` at runtime, not a load-time error.
|
||||
|
||||
That's it. The menu picks it up on the next run.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user