F5F Stay Refreshed Software Operating Systems Attempting to set up Raspbian automation is challenging.

Attempting to set up Raspbian automation is challenging.

Attempting to set up Raspbian automation is challenging.

M
mmillaa
Member
197
11-01-2024, 11:19 AM
#1
I'm working with a Plex server on a Raspberry Pi, and all media is stored on networked drives. When I power on the Pi, I need to launch the console and run commands like "sudo mount -a sudo service plexmediaserver restart." Right now I'm trying to automate this so the Pi boots itself and starts the process without manually opening VNC each time. I'm new to Linux and would really appreciate any guidance!
M
mmillaa
11-01-2024, 11:19 AM #1

I'm working with a Plex server on a Raspberry Pi, and all media is stored on networked drives. When I power on the Pi, I need to launch the console and run commands like "sudo mount -a sudo service plexmediaserver restart." Right now I'm trying to automate this so the Pi boots itself and starts the process without manually opening VNC each time. I'm new to Linux and would really appreciate any guidance!

D
dudu2599
Junior Member
18
11-19-2024, 10:27 AM
#2
Create a cron job that boots up, pauses for 10 seconds, then executes the desired commands. Ensure all dependencies are loaded before Plex starts.
D
dudu2599
11-19-2024, 10:27 AM #2

Create a cron job that boots up, pauses for 10 seconds, then executes the desired commands. Ensure all dependencies are loaded before Plex starts.

K
kingpie64
Member
144
11-20-2024, 04:30 AM
#3
It appears all devices are being mounted via /etc/fstab. For the service, you're likely using SystemD. You should learn how to activate it automatically. A possible command is `sudo systemctl enable plexmediaserver` followed by a reboot.
K
kingpie64
11-20-2024, 04:30 AM #3

It appears all devices are being mounted via /etc/fstab. For the service, you're likely using SystemD. You should learn how to activate it automatically. A possible command is `sudo systemctl enable plexmediaserver` followed by a reboot.

X
Xx_TigerHD_xX
Junior Member
6
11-20-2024, 09:18 PM
#4
raspbian.sh

Give execute rights and save to ~/.config/autostart-scripts with a .desktop file for all desktops.
X
Xx_TigerHD_xX
11-20-2024, 09:18 PM #4

raspbian.sh

Give execute rights and save to ~/.config/autostart-scripts with a .desktop file for all desktops.

C
cuitiflamme
Junior Member
6
12-05-2024, 12:30 AM
#5
You can also locate the systemd service file for plex and configure it to start after a specific system event, such as when certain drives are mounted (and entries exist in fstab). The relevant file will appear with a .service extension. Make sure to enable the service properly so it launches automatically upon boot. One possible issue with Raspberry Pi is its sensitivity to device detection; if the drive isn't detected after OS attempts to mount it, it might cause problems. You should check the logs for more details.
C
cuitiflamme
12-05-2024, 12:30 AM #5

You can also locate the systemd service file for plex and configure it to start after a specific system event, such as when certain drives are mounted (and entries exist in fstab). The relevant file will appear with a .service extension. Make sure to enable the service properly so it launches automatically upon boot. One possible issue with Raspberry Pi is its sensitivity to device detection; if the drive isn't detected after OS attempts to mount it, it might cause problems. You should check the logs for more details.