On Thursday, April 6, 2017 at 6:43:36 PM UTC-6, Dropnine wrote:
> On Thursday, March 30, 2017 at 12:48:34 PM UTC-6, Dropnine wrote:
>
> I was asked to correct a part that will stop you from automating tcpser on
boot. The error is in the type portion of the serialBridge.service text file.
>
> It should be Type=forking. If it's anything else, LINUX will end the thread
because it considers the script to have run and maintain its own PID.
>
> Sorry for the error. The serialBridge.service file should look like below.
>
> Edit your original or just type "rm /lib/systemd/systemserialBridge.service"
to remove the old file and remake it by doing the following:
>
> type: sudo vi /lib/systemd/system/serialBridge.service
> type: i
>
> Copy and paste everything between the # mark lines into the editor (or type
it in if you are a better typer than myself):
>
> ####################
> [Unit]
> Description=Serial to TCP-IP Bridge
> After=Multi-User.target
>
> [Install]
> WantedBy=Multi-user.target
>
> [Service]
> ExecStart=/home/pi/serialBridge
> Type=forking
> #####################
>
>
> .... Cheers
And... if you're still having an issue, add: Restart=on-abort
after the Type=forking entry.
If you are using a stand-alone lite raspian on your pi, editing the
/etc/rc.local file and putting the the tcpser command before the "exit 0" line
will also accomplish the autostart on boot. The rc.local file is read-only so
you'll need to change the
permissions.
Seems to be a few flavours of raspian out there or something is going
bonkers... Many ways to do an autoboot, as you can see.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|