1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/haste_ynh.git synced 2024-09-03 20:36:28 +02:00

Update install

This commit is contained in:
frju365 2017-10-15 01:32:51 +02:00 committed by GitHub
parent 56cd8d5a2d
commit 92cabd9b1c

View file

@ -121,6 +121,7 @@ script_dir="$PWD"
pushd "$final_path" pushd "$final_path"
chown -R $app: $final_path chown -R $app: $final_path
npm install npm install
popd
DATA_PATH="/home/yunohost.app/"$app DATA_PATH="/home/yunohost.app/"$app
mkdir -p $DATA_PATH mkdir -p $DATA_PATH
chown -R "$app":"$app" $final_path $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 # 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 # ENABLE SERVICE IN ADMIN PANEL
@ -153,6 +154,14 @@ then
ynh_app_setting_set "$app" unprotected_uris "/" ynh_app_setting_set "$app" unprotected_uris "/"
fi 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 # RELOAD NGINX
#================================================= #=================================================