Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7493

Troubleshooting • Trouble Creating A Systemd Service

$
0
0
Hi

I am trying to have a webRTC program start upon booting my Pi. I've decided to use a systemd service to do this as I use this method on other Pi's.

I start by creating the service:

Code:

sudo tee /etc/systemd/system/webrtc.service >/dev/null << EOF[Unit]Wants=network.target[Service]ExecStart=GO111MODULE=on go run *.goWorkingDirectory=/home/nickserver/RTSPtoWebRTC[Install]WantedBy=multi-user.targetEOF
I then reload, enable and start the service, which all work without error however the webRTC program is not actually started.

Code:

sudo systemctl daemon-reloadsudo systemctl enable webrtcsudo systemctl start webrtc
I believe my problem lies within the ExecStart/WorkingDirectory parts of my service but I am stumped as to why it isn't working.

When I run

Code:

GO111MODULE=on go run *.go
with /home/nickserver/RTSPtoWebRTC as the CWD, the program starts and works well.

Any help is appreciated, thank you.

Statistics: Posted by Yahoo Kazooie — Fri Jan 26, 2024 4:48 am — Replies 1 — Views 49



Viewing all articles
Browse latest Browse all 7493

Trending Articles