Vyos-postconfig-bootup.script does not run the commands after reboot

Hello. I try to run node_exporter automatically after vyos router restart, but it doesn’t run when I put it in vyos-postconfig-bootup.script? Where should I put it to start automatically? Thanks.

$ cat vyos-postconfig-bootup.script 
#!/bin/sh
# This script is executed at boot time after VyOS configuration is fully applied.
# Any modifications required to work around unfixed bugs
# or use services not available through the VyOS CLI system can be placed here.
/config/scripts/bin/node_exporter &

hi @janiisi , you do this in proper way. Check script permissions, it should have -x (executable flag)
Also it can be problem with script itself, try to research logs after boot.
Read more about scripting in VyOS docs Command Scripting — VyOS 1.3.x (equuleus) documentation

Thanks, the issue was to add sudo before the node exporter in vyos-postconfig-bootup.script.

sudo /config/scripts/bin/node_exporter &

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.