1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/airsonic_ynh.git synced 2024-09-03 18:06:14 +02:00

Fix upgrade

This commit is contained in:
Kay0u 2019-10-07 19:26:15 +02:00
parent b9c2eb6710
commit e00fa3096d
No known key found for this signature in database
GPG key ID: 7FF262C033518333

View file

@ -147,13 +147,6 @@ 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
# Use multimedia folder if needed
if ! grep -q "/home/yunohost.multimedia/share/Music" $final_path/db/airsonic.script; then
echo "INSERT INTO MUSIC_FOLDER VALUES(1,'/home/yunohost.multimedia/share/Music','YunoHost Music',TRUE)" >> $final_path/db/airsonic.script
# Remove the default folder
ynh_replace_string --match_string="0,'/var/music','Music'" --replace_string="" --target_file="$final_path/db/airsonic.script"
fi
#================================================= #=================================================
# ENABLE "TRANSCODE" # ENABLE "TRANSCODE"
#================================================= #=================================================
@ -238,6 +231,19 @@ ynh_script_progression --message="Starting a systemd service..." --weight=12
ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/airsonic.log" --line_match="Started Application in" ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/airsonic.log" --line_match="Started Application in"
# Use multimedia folder if needed
if ! grep -q "/home/yunohost.multimedia/share/Music" $final_path/db/airsonic.script; then
ynh_systemd_action --service_name=$app --action="stop"
# Use multimedia folder
ynh_replace_string --match_string="INSERT INTO MUSIC_FOLDER VALUES(0,'/var/music','Music'" --replace_string="INSERT INTO MUSIC_FOLDER VALUES(0,'/home/yunohost.multimedia/share/Music','YunoHost Music'" --target_file="$final_path/db/airsonic.script"
ynh_script_progression --message="Restarting a systemd service..." --weight=12
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/airsonic.log" --line_match="Started Application in"
fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================