I have a web-based Wake-On-Lan (WOL) utility build using Go language. This can wakeup the computer directly over HTTP using the computer name in URL. This is very helpful for me to have this included in my DevOps automation when I can wake the machine without any user intervention. I took the source from Github modified it little and compiled it to run on Asuswrt-Merlin running on RT-AC68U. I am using this utility behind NGINX.
Everything works except - I could not figure out how to make this utility work as daemon (service) which starts automatically after boot.
I was able to manually make it run in background with the command:
I tried to put the same command in /jffs/scripts/services-start but it does not run. I am not even sure if that script is called by entware.
Can we make this into service which can be start/stop/restart from command line? I don't think we can use unit file to make this as service.
I would appreciate any guidance.
Everything works except - I could not figure out how to make this utility work as daemon (service) which starts automatically after boot.
I was able to manually make it run in background with the command:
Code:
/mnt/entware/WolWeb/wolweb > /mnt/entware/WolWeb/wolweb.log 2>&1 &
I tried to put the same command in /jffs/scripts/services-start but it does not run. I am not even sure if that script is called by entware.
Can we make this into service which can be start/stop/restart from command line? I don't think we can use unit file to make this as service.
I would appreciate any guidance.