Sat Jan 28, 2023 4:00 pm by chester
If the service fails to start with something similar to this:
[root@serviio~]# journalctl -xe
serviio.service - Serviio Media Server
Loaded: loaded (/etc/systemd/system/serviio.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2023-01-28 14:39:45 UTC; 9s ago
Process: 3472 ExecStart=/opt/serviio/bin/serviio.sh (code=exited, status=203/EXEC)
Main PID: 3472 (code=exited, status=203/EXEC)
Jan 28 14:39:45 tfm-rius systemd[1]: Starting serviio daemon...
Jan 28 14:39:45 tfm-rius systemd[3472]: serviio.service: Failed to execute command: Exec format error
Jan 28 14:39:45 tfm-rius systemd[3472]: serviio.service: Failed at step EXEC spawning /opt/serviio/bin/serviio: Exec format error
Jan 28 14:39:45 tfm-rius systemd[1]: serviio.service: Main process exited, code=exited, status=203/EXEC
Jan 28 14:39:45 tfm-rius systemd[1]: serviio.service: Failed with result 'exit-code'.
Jan 28 14:39:45 tfm-rius systemd[1]: Failed to start serviio daemon.
Then you might have selinux set to enforcing. If the following is true:
[root@serviio~]# getenforce
Enforcing
Then you need to give the serviio.sh script additional permissions as follows:
[root@serviio~]# semanage fcontext -a -t bin_t /opt/serviio/bin/serviio.sh
[root@serviio~]# restorecon -vF /opt/serviio/bin/serviio.sh
Good luck!