mirror of
https://github.com/YunoHost-Apps/airsonic_ynh.git
synced 2024-09-03 18:06:14 +02:00
[enh] give write access to multimedia folder
So music can be uploaded from web ui
This commit is contained in:
parent
305a676301
commit
29ee30c01b
3 changed files with 17 additions and 0 deletions
|
@ -60,3 +60,14 @@ ynh_multimedia_addfolder () {
|
||||||
|
|
||||||
./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="$source_dir" --dest="$dest_dir"
|
./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="$source_dir" --dest="$dest_dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Grant write access to multimedia directories to a specified user
|
||||||
|
#
|
||||||
|
# usage: ynh_multimedia_addaccess user_name
|
||||||
|
#
|
||||||
|
# | arg: user_name - User to be granted write access
|
||||||
|
ynh_multimedia_addaccess () {
|
||||||
|
local user_name=$1
|
||||||
|
groupadd -f multimedia
|
||||||
|
usermod -a -G multimedia $user_name
|
||||||
|
}
|
||||||
|
|
|
@ -118,6 +118,9 @@ ynh_multimedia_build_main_dir
|
||||||
ynh_multimedia_addfolder --source_dir="/home/yunohost.airsonic/Podcasts" --dest_dir="share/Podcasts"
|
ynh_multimedia_addfolder --source_dir="/home/yunohost.airsonic/Podcasts" --dest_dir="share/Podcasts"
|
||||||
ynh_multimedia_addfolder --source_dir="/home/yunohost.airsonic/Playlists" --dest_dir="share/Playlists"
|
ynh_multimedia_addfolder --source_dir="/home/yunohost.airsonic/Playlists" --dest_dir="share/Playlists"
|
||||||
|
|
||||||
|
# Allow Airsonic to write into these directories
|
||||||
|
ynh_multimedia_addaccess $app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENABLE "TRANSCODE"
|
# ENABLE "TRANSCODE"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -147,6 +147,9 @@ if ! grep -q "PlaylistFolder" $final_path/airsonic.properties; then
|
||||||
echo "PlaylistFolder=/home/yunohost.multimedia/share/Playlists" >> $final_path/airsonic.properties
|
echo "PlaylistFolder=/home/yunohost.multimedia/share/Playlists" >> $final_path/airsonic.properties
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Allow Airsonic to write into these directories
|
||||||
|
ynh_multimedia_addaccess $app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENABLE "TRANSCODE"
|
# ENABLE "TRANSCODE"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue