[Tutor] systemd

Dave Hill dave at the-hills.org.uk
Sun Mar 3 11:16:29 EST 2019


Thank you - registering with Linux Mint

On 03/03/2019 16:01, Alan Gauld via Tutor wrote:
> On 03/03/2019 14:46, Dave Hill wrote:
>
>> on power up, and I thought that I would use 'systemd'.
> This is really a Linux question not Python so you might like to try the
> Mint forums too. They are usually pretty responsive.
>
>>      [Service]
>>      Type=idle
>>
>>      User=pi
>>      ExecStart=/bin/bash /home/pi/Code/testVideo.sh
>>
>>      Restart=no
>>      RestartSec=0
>> where 'testVideo.sh'
>>
>>      ## Dave Hill, 28/02/2019
>>
>>      # 2 = HDMI, 1 = headphones, 0 = Auto
>>      amixer cset numid=3 1
>>
>>      python3 /home/pi/Code/TestVideo#6.py CLIP0026.MP4 20 DEBUG
> To be honest I'm surprised that works.
> I'd expected bash to interpret the # as a comment delimiter!
> But I tried it and it seems ok, you live and learn...
>
>> Is there a way in which I can have automatic restart but also have a way
>> of exiting?
> That's the Linux bit... :-)
>


More information about the Tutor mailing list