Created
October 6, 2022 23:42
-
-
Save doodleblob/63b6ab02c3e83c608cc2ab92f76ad490 to your computer and use it in GitHub Desktop.
Docker SMB Mount for Plex Container on Startup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# | |
# rc.local | |
# | |
# 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 enable or disable this script just change the execution | |
# bits. | |
# | |
# By default this script does nothing. | |
while ! timeout 0.5 bash -c "</dev/tcp/nas.barry.network/445" >/dev/null 2>&1 | |
do sleep 2 | |
done | |
mount -t cifs -o ro,uid=0,credentials=/root/.plexcredentials,iocharset=utf8,vers=3.0 //nas.barry.network/Media /home/docker/plex/media | |
docker container start plex | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment