Using non conf commands in vbash script


I’m writing some automation for Vyos and trying to use the restart command in the vbash script. I get an Invalid command: [restart] error. Haven’t found the fix yet, prob missing something simple.

thanks for any help pointing me in the write direction

please share your script

Here it is:

source /opt/vyatta/etc/functions/script-template

curl --output /home/vyos/rules.tar.gz

# Path to the rules.tar.gz file

# Directory where rules should be extracted

# Extract the rules.tar.gz file
tar -xvzf "$RULES_ARCHIVE" -C "$RULES_DIR" --overwrite

# Optional: Restart Suricata
restart container suricata

Try using run restart container suricata
Docs: Command Scripting — VyOS 1.5.x (circinus) documentation


Thanks, completely overlooked that.