We wish to run run_reports.sh automatically upon system startup, instead of having to run it manually. We are currently running on CentOS 7. I tried creating the following Systemd service unit for this:
Description=Galaxy Reports After=network.target After=time-sync.target After=galaxy-web.service Requires=galaxy-web.service [Service] PermissionsStartOnly=true Type=simple PIDFile=/home/usern/galaxy/galaxy/reports_webapp.pid User=galaxy Group=galaxys Restart=on-abort WorkingDirectory=/home/usern/galaxy/galaxy ExecStart=/home/usern/galaxy/galaxy/run_reports.sh start [Install] WantedBy=multi-user.target
This worked fine whilst the script worked through the long installation processes it always runs, but it then failed, presumably at the final ‘eval’ of the script - I believe Systemd can’t cope with the script becoming a new process.
I tried changing
forking and specifying the PID file path, However, this just led to Systemd timing out the startup of the service, during the long run of the initial parts of the script.
Have you any advice on how to implement this? Should I specify an extremely long timeout (~120 minutes) for the “forking” method?