diff --git a/conf/systemd.service b/conf/systemd.service index 0684052..4808e55 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,7 +9,7 @@ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ Environment=ETHERPAD_PRODUCTION=true Environment="__YNH_NODE_LOAD_PATH__" -ExecStart=__YNH_NODE__ __INSTALL_DIR__/src/node/server.js +ExecStart=__INSTALL_DIR__/bin/run.sh StandardOutput=append:/var/log/__APP__/etherpad.log StandardError=inherit Restart=always diff --git a/scripts/install b/scripts/install index c239422..8a6bc5f 100644 --- a/scripts/install +++ b/scripts/install @@ -130,7 +130,8 @@ popd ynh_script_progression --message="Installing Etherpad..." --weight=90 pushd $install_dir - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true src/bin/installDeps.sh + ynh_exec_warn_less npm install pnpm -g + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true bin/installDeps.sh popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index be9c68f..90f1f20 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -3,8 +3,6 @@ source _common.sh source /usr/share/yunohost/helpers -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # ACTIVATE MAINTENANCE MODE #================================================= @@ -67,14 +65,10 @@ ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \ #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=4 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=4 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="settings.json credentials.json" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep="settings.json credentials.json" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" @@ -192,7 +186,8 @@ popd ynh_script_progression --message="Upgrading Etherpad..." --weight=10 pushd $install_dir - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true src/bin/installDeps.sh + ynh_exec_warn_less npm install pnpm -g + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true bin/installDeps.sh popd #=================================================