pyCEC icon indicating copy to clipboard operation
pyCEC copied to clipboard

How to run as a service

Open HorizonKane opened this issue 3 years ago • 1 comments

Hi,

can anybody please explain me how I can run the server as a service on raspbian buster, so I can close Putty and still use it? :)

Thanks!

HorizonKane avatar May 16 '21 18:05 HorizonKane

Put this into /etc/systemd/system/cec.service:

[Unit]
Description=PyCEC
Documentation=
After=network.target

[Service]
Type=simple
User=pi
ExecStart=/usr/bin/python3 -m pycec
Restart=always

[Install]
WantedBy=multi-user.target

sudo systemctl enable cec && sudo systemctl start cec

soundstorm avatar Jul 10 '21 11:07 soundstorm