@ -905,6 +905,7 @@ def alertScript(alerts):
if mapping.get("Type") == "BASH":
logger.debug('Mapping type is "BASH"')
for cmd in commands:
cmd = cmd.format(alert_title=alert) # Replace placeholder with alert title
logger.info("AlertScript: Executing BASH command: %s", cmd)
subprocess.run(cmd, shell=True)
elif mapping.get("Type") == "DTMF":
@ -327,10 +327,12 @@ AlertScript:
# This is an example entry that will automatically execute SkyDescribe and
# announce the full details of a Tornado Warning when it is detected.
# The placeholder '{alert_title}' will be replaced with the title of the alert
# when AlertScript executes the command.
- Type: BASH
Commands:
- '/usr/local/bin/SkywarnPlus/SkyDescribe.py "Tornado Warning"'
- '/usr/local/bin/SkywarnPlus/SkyDescribe.py "{alert_title}"'
Triggers:
- Tornado Warning
Powered by TurnKey Linux.