Improving the installation of the script as system service.
Currently the service expects the maestro.py to fork itself and exit but it doesn't. This is causing that calling sudo systemctl start maestro.service doesn't return to command line.
The service itself is running as user root with all the privilegues belonging to root which isn't a good idea in terms of security.
Logging is done to a logfile though a service should better log to the system journal.
Changes in this pull request:
Changes service Type to notify (forking of the process is then handled by systemd).
Adds a notify to the maestro.py script.
Chages service to run as user/group maestro_service
Adds imports needed for systemd handling.
Changes logging to journal if run as system service.
Adds a check for the availability of Python 3
Install and update scripts install additional needed dependencies
Location of service files moved from /opt/maestro to /usr/local/lib/maestro_service
Creates a user and group maestro_service
Removes the executable from the maestro.service file.
Improving the installation of the script as system service.
Currently the service expects the maestro.py to fork itself and exit but it doesn't. This is causing that calling sudo systemctl start maestro.service doesn't return to command line. The service itself is running as user root with all the privilegues belonging to root which isn't a good idea in terms of security. Logging is done to a logfile though a service should better log to the system journal.
Changes in this pull request:
Todo