Last active
September 13, 2025 14:48
-
-
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` | |
| # clear cache & log dirs | |
| CACHE_DIR=$HOME/.cache/dlna/$NAME | |
| LOG_DIR=$HOME/log/dlna/$NAME | |
| for d in $CACHE_DIR $LOG_DIR; | |
| do rm -f$ $d | |
| mkdir -p $d | |
| done; | |
| rclone serve dlna --addr :$PORT $DATA_DIR --buffer-size 512M --dir-cache-time 4h --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 > $LOG_DIR/rclone.log & | |
| exit 0 | |
| # # m h dom mon dow command | |
| #@reboot /home/vijay/bin/dlna.sh 8081 /mnt/data/Music |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment