1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/peertube_ynh.git synced 2024-09-03 19:56:29 +02:00

Several reorder

This commit is contained in:
yalh76 2021-04-11 20:43:53 +02:00
parent 55b28881be
commit 0828544028
4 changed files with 13 additions and 13 deletions

View file

@ -7,7 +7,7 @@
# dependencies used by the app
pkg_dependencies="ffmpeg postgresql postgresql-contrib openssl g++ redis-server redis-tools mailutils apt-transport-https"
YNH_NODEJS_VERSION=14
NODEJS_VERSION=14
#=================================================
# PERSONAL HELPERS

View file

@ -82,7 +82,7 @@ ynh_exec_warn_less yunohost firewall allow TCP $rtmp_port
ynh_script_progression --message="Installing dependencies..."
# Install nodejs
ynh_install_nodejs --nodejs_version=$YNH_NODEJS_VERSION
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
# Install dependencies
ynh_install_app_dependencies $pkg_dependencies
@ -166,14 +166,6 @@ pushd "$final_path"
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production --pure-lockfile
popd
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config --others_var="ynh_node_load_PATH"
#=================================================
# ADD A CONFIGURATION
#=================================================
@ -189,6 +181,14 @@ ynh_add_config --template="../conf/local-production.json" --destination="$final_
chmod 400 "$final_path/config/local-production.json"
chown $app:$app "$final_path/config/local-production.json"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config --others_var="ynh_node_load_PATH"
#=================================================
# START SYSTEMD SERVICE
#=================================================

View file

@ -105,7 +105,7 @@ ynh_exec_warn_less yunohost firewall allow TCP $rtmp_port
ynh_script_progression --message="Reinstalling dependencies..."
# Install nodejs
ynh_install_nodejs --nodejs_version=$YNH_NODEJS_VERSION
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
# Install dependencies
ynh_install_app_dependencies $pkg_dependencies

View file

@ -107,8 +107,8 @@ ynh_script_progression --message="Backing up the app before upgrading (may take
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# Restore it if the upgrade fails
ynh_clean_check_starting
# Restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
@ -187,7 +187,7 @@ ynh_add_nginx_config "datadir"
ynh_script_progression --message="Upgrading dependencies..."
# Install nodejs
ynh_install_nodejs --nodejs_version=$YNH_NODEJS_VERSION
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
# Install dependencies
ynh_install_app_dependencies $pkg_dependencies