<div dir="auto">No idea mate. Have you tried the usual? File permissions, is it executable (both the script and the system control file), does the new service need 'enabling' somewhere (I'm thinking where the script used to need linking in your RC folders to be active on SysV init).<div dir="auto"><br></div><div dir="auto">I've not created any systemd services myself so I'm sorry I can't be more help.</div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 1 Mar 2021, 12:25 Richard M Eggleston via Newark, <<a href="mailto:newark@mailman.lug.org.uk">newark@mailman.lug.org.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi All,<div><br></div><div>I realise this is fairly low level stuff, and I have spent a fair bit of time on search engines and forums, but my specific question isn’t being addressed</div><div><br></div><div><br><div>I have been running sickgear as a PVR (I know about torrents and copyright breach..don’t @me, I’m a big boy) however it starts by running the following from a command line</div><div><br></div><div><span style="font-style:normal"><font face="Trebuchet MS">Cd /opt/sickgear</font></span></div><div><span style="font-style:normal"><font face="Trebuchet MS">Sudo -u python3 ./sickgear.py</font></span></div><div><span style="font-style:normal"><font face="Trebuchet MS"><br></font></span></div><div><font face="Trebuchet MS">And that works nicely</font></div><div><br></div><div>So being a good soldier,(i.e Lazy) I combined these into a bash script (called runsickgear.sh)</div><div><br></div><div><font face="Trebuchet MS"><span style="font-style:normal">#!/bin/bash</span></font></div><div><font face="Trebuchet MS"><span style="font-style:normal">Cd /opt/sickgear</span></font></div><div><font face="Trebuchet MS"><span style="font-style:normal">Sudo -u python3 ./sickgear.py</span></font></div><div><br></div><div>Which can be run from CL and works beautifully..</div><div><br></div><div><font face="Trebuchet MS">bash runsickgear.sh</font></div><div><br></div><div>Now me, being me, I don’t want the hassle of running no lousy scripts, and I don’t want any untidy terminals left open either (OCD? No not me)</div><div>I would like this to run as a service at boot time, and Be stopped, started and messed around with using</div><div><br></div><div><font face="Trebuchet MS"><span style="font-style:normal">Sudo systemctl sickgear {stop/start/enable/halt & catchfire}</span></font></div><div><br></div><div>SO I copy the runsickgear.sh script to</div><div><br></div><div>/usr/bin/sickgear/runsickgear.sh</div><div><br></div><div>Generate a file /etc/systemd/system/sickgear.service</div><div> Which looks like</div><div><br></div><div><br></div><div><font face="Trebuchet MS"><span style="font-style:normal">[Unit]</span></font></div><div><font face="Trebuchet MS"><span style="font-style:normal">Description=sickgear service</span></font></div><div><font face="Trebuchet MS"><span style="font-style:normal"><br></span></font></div><div><font face="Trebuchet MS"><span style="font-style:normal">[Service]</span></font></div><div><font face="Trebuchet MS"><span style="font-style:normal"> ExecStart=/usr/bin/sickgear/runsickgear.sh</span></font></div><div><font face="Trebuchet MS"><span style="font-style:normal"><br></span></font></div><div><font face="Trebuchet MS"><span style="font-style:normal">[Install]</span></font></div><div><font face="Trebuchet MS"><span style="font-style:normal">WantedBy=Multi-User.Target</span></font></div><div><br></div><div>Now according to Google, etc after I run </div><div>Sudo systemctl daemon-reload</div><div>Then I should be able to do systemctl enable etc</div><div><br></div><div>But I can’t, </div><div><br></div><div>And the logs seem to give me no insight, and the Ubuntu forums seem more interested in angels dancing on heads of pins or whether </div><div>I am fairly sure this is a syntax error somewhere, but what ever I do, it doesn’t seem to work.. Given my desk and keyboard now have forehead shaped dents in need help. Google has loads o examples, and I have worked through many of them (Mostly look the same as the ones I’ve shown)</div><div><br></div><div>Any bright ideas?</div><div><br></div><div>Cheers</div><div>Richard</div><div><br></div></div></div>-- <br>
Newark mailing list<br>
<a href="mailto:Newark@mailman.lug.org.uk" target="_blank" rel="noreferrer">Newark@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/newark" rel="noreferrer noreferrer" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/newark</a></blockquote></div>