Last active
July 22, 2024 19:27
-
-
Save vijinho/bf16c898d093349e362b1a186926a55d to your computer and use it in GitHub Desktop.
A simple DLNA server using rclone, run with "dlna.sh <PORT> <FOLDER>" e.g. dlna.sh 8080 /mnt/shared/music/ - can be run on boot with last line added to 'crontab -e' for root
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
# ./dlna.sh 8080 /mnt/data/audio | |
PORT=$1 | |
DATA_DIR=$2 | |
NAME=`basename $DATA_DIR` | |
CACHE_DIR=/var/cache/dlna/$NAME | |
#rm -fR $CACHE_DIR | |
mkdir -p $CACHE_DIR | |
chmod -fR 777 $CACHE_DIR | |
/home/linuxbrew/.linuxbrew/bin/rclone serve dlna --addr :$PORT $DATA_DIR --buffer-size 1G --dir-cache-time 24h --cache-dir $CACHE_DIR --vfs-cache-mode full --vfs-cache-max-size 1G --vfs-cache-max-size 16M --no-checksum --no-modtime --vfs-case-insensitive --vfs-disk-space-total-size 4G --name $NAME 2>&1 > /var/log/rclone.log & | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment