diff --git a/scripts/install b/scripts/install index ee65285..d2b7ff1 100755 --- a/scripts/install +++ b/scripts/install @@ -24,7 +24,7 @@ ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -#ynh_script_progression --message="Setting up source files..." --weight=1 +ynh_script_progression --message="Setting up source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src mkdir -p $install_dir @@ -32,19 +32,6 @@ mkdir -p $install_dir chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# INSTALL n8n -#================================================= -ynh_script_progression --message="Installing $app..." --weight=2 - -pushd $install_dir - ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install n8n@${n8n_version} -popd - -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # NGINX CONFIGURATION #================================================= @@ -69,6 +56,19 @@ ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" +#================================================= +# INSTALL n8n +#================================================= +ynh_script_progression --message="Installing $app..." --weight=2 + +pushd $install_dir + ynh_use_nodejs + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install n8n@${n8n_version} +popd + +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # START SYSTEMD SERVICE #=================================================