[Solved] Executing python command at startup. Putting it on rc.local does not work anymore

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Garret
Posts: 52
Joined: Sat Nov 10, 2018 12:23 pm

[Solved] Executing python command at startup. Putting it on rc.local does not work anymore

Post by Garret »

I was executing the command to launch the application Bazarr on startup by adding it before the line exit 0 in /etc/rc.local.
However, since some time I noticed that Bazarr does not launch anymore and have to start it manually. Do you have some advice on how to fix this issue?

This has been my /etc/rc.local:

Code: Select all

#!/bin/sh -e
#
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to disable this script please use systemd to control the service:
# systemctl disable rc-local.service
#
# By default this script does nothing.

python /mnt/dietpi_userdata/bazarr/bazarr.py &
exit 0
I also just tried to follow this guide https://github.com/morpheus65535/bazarr ... ian-Ubuntu but did not work.

This is my /etc/systemd/system/bazarr.service

Code: Select all

[Unit]
Description=bazarr Daemon
After=syslog.target network.target

[Service]
User=root
Group=root

Type=simple
ExecStart=/usr/bin/python /mnt/dietpi_userdata/bazarr/bazarr.py
TimeoutStopSec=20
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target
But if I give the command systemctl start bazarr I can see that bazarr actually starts...

EDIT: I solved. I had to give the command systemctl enable bazarr to have the service starts at boot.
Post Reply