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

Raspberry Pi OS • Auto start script with systemd fails

$
0
0
Hello, I would like to auto start a script to run my auto LibreTranslate server, however my systemd scipt doesn't auto start the server after reboot?
I researched the /etc/rc.local file is no longer best practice, so created the following file:

Code:

 rapi5  raspberrypi  lib  systemd  system  $  pwd/lib/systemd/system rapi5  raspberrypi  lib  systemd  system  $  cat run-libretranslate.service cd ~/LibreTranslatesource ~/libretranslate-env/bin/activatepython main.py --host 0.0.0.0 --load-only en,fr,de&
I made the file executable.

I tried without the &, however the & is apparently needed for a script that runs continuously or is likely not to exit, it's important to fork the process by adding an & at the end of the command to allow the boot process to continue.

I read this post viewtopic.php?t=382025, however thought I'd begin a new post.

Statistics: Posted by eiger3970 — Fri Mar 21, 2025 4:26 pm



Viewing all articles
Browse latest Browse all 2556

Trending Articles