Activate Systemd for Go executeables
Systemd is a magic service that keeps your Go site running by monitoring that the site is running. If needed systemd restarts the service. You have to point to which Go executable that should be monitored. Each site has its own service and should be placed in
Each "site.service" should look something like this:
[Unit] Description=gowebdev [Service] Type=simple User=root Restart=always RestartSec=5s WorkingDirectory=/var/www/gowebdev ExecStart=/var/www/gowebdev/main [Install] WantedBy=multi-user.target
When the service is created, you muste reload systemd.
Once enabled, you can start, stop and restart this service
service go4webdev restart (replace with your own "service name")
You can create a "button" (Custom Command) in Webmin that fires this command without typing: