mirror of
https://github.com/YunoHost-Apps/joplin_ynh.git
synced 2024-09-03 19:36:03 +02:00
cleaning
This commit is contained in:
parent
89bb3850a2
commit
d0f3f42ec5
5 changed files with 7 additions and 31 deletions
|
@ -18,7 +18,7 @@ admindoc = "https://joplinapp.org/help/"
|
|||
code = "https://github.com/laurent22/joplin/"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.2.18"
|
||||
yunohost = ">= 11.2.29"
|
||||
helpers_version = "2.1"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
|
|
@ -16,29 +16,22 @@ ynh_app_setting_set --key=admin_mail --value=$admin_mail
|
|||
#=================================================
|
||||
ynh_script_progression "Installing dependencies..."
|
||||
|
||||
# Install Nodejs
|
||||
ynh_nodejs_install
|
||||
|
||||
#=================================================
|
||||
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression "Setting up source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression "Adding system configurations related to $app..."
|
||||
|
||||
# Create a dedicated NGINX config using the conf/nginx.conf template
|
||||
ynh_config_add_nginx
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_config_add_systemd
|
||||
|
||||
yunohost service add $app --description="Note-taking appliction" --log="/var/log/$app/$app.log"
|
||||
|
@ -52,19 +45,15 @@ ynh_script_progression "Adding $app's configuration..."
|
|||
|
||||
ynh_config_add --template=".env" --destination="$install_dir/.env"
|
||||
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/.env"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# INSTALL JOPLIN
|
||||
#=================================================
|
||||
ynh_script_progression "Building $app..."
|
||||
|
||||
pushd $install_dir/packages/server
|
||||
|
||||
ynh_hide_warnings ynh_exec_as_app node_load_PATH BUILD_SEQUENCIAL=1 yarn install --inline-builds
|
||||
ynh_hide_warnings ynh_exec_as_app node_load_PATH yarn build
|
||||
ynh_hide_warnings ynh_exec_as_app node_load_PATH yarn cache clean
|
||||
ynh_hide_warnings ynh_exec_as_app BUILD_SEQUENCIAL=1 yarn install --inline-builds
|
||||
ynh_hide_warnings ynh_exec_as_app yarn build
|
||||
ynh_hide_warnings ynh_exec_as_app yarn cache clean
|
||||
ynh_safe_rm .yarn/berry
|
||||
popd
|
||||
|
||||
|
@ -73,7 +62,6 @@ popd
|
|||
#=================================================
|
||||
ynh_script_progression "Starting $app's systemd service..."
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemctl --service=$app --action="start" --log_path="systemd" --wait_until="Starting services..."
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -11,7 +11,6 @@ ynh_script_progression "Restoring the app main directory..."
|
|||
|
||||
ynh_restore "$install_dir"
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
#=================================================
|
||||
# RESTORE THE PostgreSQL DATABASE
|
||||
#=================================================
|
||||
|
@ -32,8 +31,6 @@ ynh_nodejs_install
|
|||
#=================================================
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression "Restoring system configurations related to $app..."
|
||||
|
||||
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
@ -48,7 +45,6 @@ yunohost service add $app --description="Note-taking appliction" --log="/var/log
|
|||
#=================================================
|
||||
ynh_script_progression "Reloading NGINX web server and $app's service..."
|
||||
|
||||
# Typically you only have either $app or php-fpm but not both at the same time...
|
||||
ynh_systemctl --service=$app --action="start" --log_path="systemd"
|
||||
|
||||
ynh_systemctl --service=nginx --action=reload
|
||||
|
|
|
@ -17,16 +17,13 @@ ynh_systemctl --service=$app --action="stop" --log_path="systemd"
|
|||
#=================================================
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep=".env"
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression "Upgrading dependencies..."
|
||||
|
||||
# Install Nodejs
|
||||
ynh_nodejs_install
|
||||
|
||||
#=================================================
|
||||
|
@ -35,10 +32,9 @@ ynh_nodejs_install
|
|||
ynh_script_progression "Building $app..."
|
||||
|
||||
pushd $install_dir/packages/server
|
||||
|
||||
ynh_hide_warnings ynh_exec_as_app node_load_PATH BUILD_SEQUENCIAL=1 yarn install --inline-builds
|
||||
ynh_hide_warnings ynh_exec_as_app node_load_PATH yarn build
|
||||
ynh_hide_warnings ynh_exec_as_app node_load_PATH yarn cache clean
|
||||
ynh_hide_warnings ynh_exec_as_app BUILD_SEQUENCIAL=1 yarn install --inline-builds
|
||||
ynh_hide_warnings ynh_exec_as_app yarn build
|
||||
ynh_hide_warnings ynh_exec_as_app yarn cache clean
|
||||
ynh_safe_rm .yarn/berry
|
||||
popd
|
||||
|
||||
|
@ -62,9 +58,6 @@ ynh_script_progression "Updating configuration..."
|
|||
|
||||
ynh_config_add --template=".env" --destination="$install_dir/.env"
|
||||
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/.env"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue