This is more a feature request, however I am trying to build a simple systemd unit for Tribler (when the webUI is exposed on a networked interface).
I have got the following done:
[Unit]
Description=Tribler Daemon
[Service]
#Restart=on-failure
Type=simple
PIDFile=%t/tribler/tribler.pid
ExecStart=/usr/share/tribler/tribler --server
ExecStartPre=/bin/sh -c 'mkdir -p %t/tribler && pgrep -u $USER -f "tribler" > %t/tribler/tribler.pid'
KillMode=mixed
ExecStopPost=/bin/rm -f %t/tribler/tribler.pid
[Install]
WantedBy=default.target
What it is really missing is an ExecStop to signal Tribler to gracefully exit, however no option seemingly exists. Adding one to mimic the shutdown from the UI would be great. Thanks!