Start automatically on linux server #345
Replies: 3 comments 2 replies
-
also interested |
Beta Was this translation helpful? Give feedback.
-
I use this script on my rasp. pi. "PLEX" is my root folder for all plex-debrid stuff. #!/bin/bash
# Navigate to /PLEX folder
cd /PLEX || exit 1
# Function to start screen session and wait for it to be ready
start_screen_session() {
local session_name="$1"
local command="$2"
screen -S "$session_name" -d -m bash -c "$command"
sleep 2
while ! screen -list | grep -q "$session_name"; do
sleep 1
done
}
# Start rclone screen session
start_screen_session "rclone" "sudo ./rclone-linux-arm64 mount realdebrid: torrents --dir-cache-time 10s --allow-other"
# Wait for a moment to ensure the rclone screen session has started
sleep 5
# Start plex_debrid screen session
start_screen_session "plex_debrid" "sudo python ./plex_debrid/main.py" To make this script auto-run on boot, add it to cronjob Note - You need to disable UI in plex-debrid settings to make this script work. |
Beta Was this translation helpful? Give feedback.
-
Why do you guys recommend the use of screen for the mount part? Why not create a simple service to mount everything without using screen? |
Beta Was this translation helpful? Give feedback.
-
Is there a way to start the rclone and plex_debrid services automatically after a reboot?
Beta Was this translation helpful? Give feedback.
All reactions