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:
parent
4afc815e6e
commit
da7ad42b92
4 changed files with 16 additions and 16 deletions
|
@ -124,7 +124,6 @@ chown $app:$app "$final_path/config.json5"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
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"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Server started"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -69,7 +69,8 @@ ynh_script_progression --message="Installing dependencies..." --weight=6
|
||||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||||
|
|
||||||
# Install Yarn
|
# 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
|
# 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
|
ynh_script_progression --message="Building Yarn dependencies... This may take several minutes for a first install." --weight=6
|
||||||
|
|
||||||
pushd "$final_path" || return 1
|
pushd "$final_path" || return 1
|
||||||
ynh_use_nodejs ; set "${ynh_node_load_PATH:?}"
|
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
|
||||||
sudo -u $app env "$ynh_node_load_PATH" yarn build
|
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
|
sudo -u $app env "$ynh_node_load_PATH" yarn install --production --ignore-scripts --prefer-offline
|
||||||
ynh_secure_remove --file="$final_path/.cache"
|
ynh_secure_remove --file="$final_path/.cache"
|
||||||
popd || return 1
|
popd || return 1
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -46,7 +46,7 @@ test ! -d $final_path \
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
# 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"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
# If final_path doesn't exist, create it
|
# If final_path doesn't exist, create it
|
||||||
if [ -z "$final_path" ]; then
|
if [ -z "$final_path" ]; then
|
||||||
final_path="/var/www/$app"
|
final_path="/var/www/$app"
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value="$final_path"
|
ynh_app_setting_set --app=$app --key=final_path --value="$final_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cleaning legacy permissions
|
# Cleaning legacy permissions
|
||||||
|
@ -110,7 +110,7 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||||
|
|
||||||
# Install Yarn
|
# Install Yarn
|
||||||
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" \
|
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
|
# SPECIFIC UPGRADE
|
||||||
|
@ -132,11 +132,11 @@ ynh_script_progression --message="Rebuilding Yarn dependencies..." --weight=2
|
||||||
chown -R $app:$app "$final_path"
|
chown -R $app:$app "$final_path"
|
||||||
|
|
||||||
pushd "$final_path" || return 1
|
pushd "$final_path" || return 1
|
||||||
ynh_use_nodejs ; set "${ynh_node_load_PATH:?}"
|
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
|
||||||
sudo -u $app env "$ynh_node_load_PATH" yarn build
|
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
|
sudo -u $app env "$ynh_node_load_PATH" yarn install --production --ignore-scripts --prefer-offline
|
||||||
ynh_secure_remove --file="$final_path/.cache"
|
ynh_secure_remove --file="$final_path/.cache"
|
||||||
popd || return 1
|
popd || return 1
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue