From 02d20eda6e492d6cc1638bffd8fb247363a97a32 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Mon, 7 Oct 2019 16:23:10 +0200 Subject: [PATCH] fix install --- scripts/install | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index bd685c4..7c27ce8 100644 --- a/scripts/install +++ b/scripts/install @@ -120,11 +120,6 @@ 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/Playlists" --dest_dir="share/Playlists" -# Use multimedia folder -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" - #================================================= # ENABLE "TRANSCODE" #================================================= @@ -258,6 +253,19 @@ then ynh_app_setting_delete --app=$app --key=skipped_uris fi +#================================================= +# USE MULTIMEDIA +#================================================= +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" + #================================================= # SETUP SSOWAT #=================================================