1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wetty_ynh.git synced 2024-09-03 18:16:29 +02:00

Small changes from example_ynh, spaces to tabs

This commit is contained in:
Salamandar 2021-05-19 16:55:54 +02:00
parent 4afc815e6e
commit da7ad42b92
4 changed files with 16 additions and 16 deletions

View file

@ -124,7 +124,6 @@ chown $app:$app "$final_path/config.json5"
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Server started"
#=================================================

View file

@ -69,7 +69,8 @@ ynh_script_progression --message="Installing dependencies..." --weight=6
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
# Install Yarn
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" \
--package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
#=================================================
# CREATE DEDICATED USER
@ -118,11 +119,11 @@ chown $app:$app "$final_path/config.json5"
ynh_script_progression --message="Building Yarn dependencies... This may take several minutes for a first install." --weight=6
pushd "$final_path" || return 1
ynh_use_nodejs ; set "${ynh_node_load_PATH:?}"
sudo -u $app env "$ynh_node_load_PATH" yarn
sudo -u $app env "$ynh_node_load_PATH" yarn build
sudo -u $app env "$ynh_node_load_PATH" yarn install --production --ignore-scripts --prefer-offline
ynh_secure_remove --file="$final_path/.cache"
ynh_use_nodejs ; set "${ynh_node_load_PATH:?}"
sudo -u $app env "$ynh_node_load_PATH" yarn
sudo -u $app env "$ynh_node_load_PATH" yarn build
sudo -u $app env "$ynh_node_load_PATH" yarn install --production --ignore-scripts --prefer-offline
ynh_secure_remove --file="$final_path/.cache"
popd || return 1
#=================================================

View file

@ -46,7 +46,7 @@ test ! -d $final_path \
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX configuration..."
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"

View file

@ -57,8 +57,8 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# If final_path doesn't exist, create it
if [ -z "$final_path" ]; then
final_path="/var/www/$app"
ynh_app_setting_set --app=$app --key=final_path --value="$final_path"
final_path="/var/www/$app"
ynh_app_setting_set --app=$app --key=final_path --value="$final_path"
fi
# Cleaning legacy permissions
@ -110,7 +110,7 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
# Install Yarn
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" \
--package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
--package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
#=================================================
# SPECIFIC UPGRADE
@ -132,11 +132,11 @@ ynh_script_progression --message="Rebuilding Yarn dependencies..." --weight=2
chown -R $app:$app "$final_path"
pushd "$final_path" || return 1
ynh_use_nodejs ; set "${ynh_node_load_PATH:?}"
sudo -u $app env "$ynh_node_load_PATH" yarn
sudo -u $app env "$ynh_node_load_PATH" yarn build
sudo -u $app env "$ynh_node_load_PATH" yarn install --production --ignore-scripts --prefer-offline
ynh_secure_remove --file="$final_path/.cache"
ynh_use_nodejs ; set "${ynh_node_load_PATH:?}"
sudo -u $app env "$ynh_node_load_PATH" yarn
sudo -u $app env "$ynh_node_load_PATH" yarn build
sudo -u $app env "$ynh_node_load_PATH" yarn install --production --ignore-scripts --prefer-offline
ynh_secure_remove --file="$final_path/.cache"
popd || return 1
#=================================================