Browse Source

Merge pull request #10980 from bobafetthotmail/master

minidlna: create UUID in config if it is empty
lilik-openwrt-22.03
Rosen Penev 5 years ago
committed by GitHub
parent
commit
a1e6aeaad3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions
  1. +1
    -1
      multimedia/minidlna/files/minidlna.config
  2. +5
    -1
      multimedia/minidlna/files/minidlna.init

+ 1
- 1
multimedia/minidlna/files/minidlna.config View File

@ -15,6 +15,6 @@ config minidlna config
option serial '12345678'
option model_number '1'
option root_container '.'
option uuid '019f9a56-ff60-44c0-9edc-eae88d09fa05'
option uuid ''
list media_dir '/mnt'
option album_art_names 'Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg'

+ 5
- 1
multimedia/minidlna/files/minidlna.init View File

@ -81,14 +81,18 @@ start() {
local db_dir
local log_dir
local user
local var
config_load 'minidlna'
config_get_bool enabled config 'enabled' '0'
[ "$enabled" -gt 0 ] || return 1
config_get val "config" uuid
[ "$val" = '' ] && uci set minidlna.config.uuid=$(cat /proc/sys/kernel/random/uuid) && uci commit
minidlna_create_config config || return 1
config_get db_dir config 'db_dir' '/var/run/minidlna'
config_get log_dir config 'log_dir' '/var/log/minidlna'
config_get user config 'user' 'root'


Loading…
Cancel
Save