diff --git a/asterisk/CHANGELOG.md b/asterisk/CHANGELOG.md index d8f4c8a..3d6e60a 100644 --- a/asterisk/CHANGELOG.md +++ b/asterisk/CHANGELOG.md @@ -22,7 +22,8 @@ - Ensure Asterisk Mailbox Server is started with `--verbose` if log level is debug or higher - Fix Asterisk Mailbox Server media directory to `/media/asterisk/voicemail/default//` for persistency - Fix Asterisk Mailbox Server cache file to `/data/tmp` for persistency -- Fix to the `/data` directory (and also `/media` when needed) are created on startup, useful when running the add-on as a standalone docker container. +- Fix to the `/data` directory (and also `/media` when needed) are created on startup, useful when running the add-on as a standalone docker container +- Fix the permissions of downloaded sounds to be `0755` to be as indicated by , although on my tests it was working before as well. ### Upgrades diff --git a/asterisk/rootfs/etc/cont-init.d/asterisk.sh b/asterisk/rootfs/etc/cont-init.d/asterisk.sh index ad08924..972a199 100755 --- a/asterisk/rootfs/etc/cont-init.d/asterisk.sh +++ b/asterisk/rootfs/etc/cont-init.d/asterisk.sh @@ -210,8 +210,6 @@ for sound in "${additional_sounds[@]}"; do if [[ -f "${lang_file}" && "$(cat "${lang_file}")" == "${sound}" ]]; then bashio::log.info "Skipping sounds download for '${sound}'..." - rm -rf "${asterisk_sound_dir}" - ln -svf "${sound_dir}" "${asterisk_sound_dir}" else bashio::log.info "Downloading '${sound}' sounds to '${sound_dir}'..." @@ -244,10 +242,10 @@ for sound in "${additional_sounds[@]}"; do cd - >/dev/null || exit 1 + chmod 0755 -R "${temp_dir}" rsync -a "${temp_dir}/" "${sound_dir}/" - rm -rf "${asterisk_sound_dir}" - ln -svf "${sound_dir}" "${asterisk_sound_dir}" - rm -rf "${temp_dir}" fi + rm -rf "${asterisk_sound_dir}" + ln -svf "${sound_dir}" "${asterisk_sound_dir}" done