From 92cabd9b1c64f09f53fa7261b4597e04840922cc Mon Sep 17 00:00:00 2001 From: frju365 Date: Sun, 15 Oct 2017 01:32:51 +0200 Subject: [PATCH] Update install --- scripts/install | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index f1a3baf..35673be 100755 --- a/scripts/install +++ b/scripts/install @@ -121,6 +121,7 @@ script_dir="$PWD" pushd "$final_path" chown -R $app: $final_path npm install +popd DATA_PATH="/home/yunohost.app/"$app mkdir -p $DATA_PATH chown -R "$app":"$app" $final_path $DATA_PATH @@ -129,7 +130,7 @@ chown -R "$app":"$app" $final_path $DATA_PATH # Configure haste with config.js file #================================================= - ynh_replace_string "YNH_DATA_PATH" "$DATA_PATH" "$final_path/config.js" +ynh_replace_string "YNH_DATA_PATH" "$DATA_PATH" "$final_path/config.js" #================================================= # ENABLE SERVICE IN ADMIN PANEL @@ -153,6 +154,14 @@ then ynh_app_setting_set "$app" unprotected_uris "/" fi +#================================================= +# Add HASTE AS A BINARY FILE +#================================================= + +ynh_replace_string "YNH_HASTE_URL" "${DOMAIN}${path%/}" "../conf/haste.sh" +sudo cp ../conf/haste.sh /usr/bin/"$app" +sudo chmod +x /usr/bin/"$app" + #================================================= # RELOAD NGINX #=================================================