Merge pull request #316 from YunoHost-Apps/testing

Update upgrade
This commit is contained in:
Sebastian Gumprich
2024-11-12 06:51:13 +01:00
committed by GitHub
22 changed files with 108 additions and 248 deletions
+1
View File
@@ -1,2 +1,3 @@
*~ *~
*.sw[op] *.sw[op]
.DS_Store
+1 -1
View File
@@ -19,7 +19,7 @@ It shall NOT be edited by hand.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Shipped version:** 5.10.29~ynh1 **Shipped version:** 5.10.45~ynh1
**Demo:** <https://react.invoicing.co/demo> **Demo:** <https://react.invoicing.co/demo>
+1 -1
View File
@@ -19,7 +19,7 @@ No se debe editar a mano.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Versión actual:** 5.10.29~ynh1 **Versión actual:** 5.10.45~ynh1
**Demo:** <https://react.invoicing.co/demo> **Demo:** <https://react.invoicing.co/demo>
+1 -1
View File
@@ -19,7 +19,7 @@ EZ editatu eskuz.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Paketatutako bertsioa:** 5.10.29~ynh1 **Paketatutako bertsioa:** 5.10.45~ynh1
**Demoa:** <https://react.invoicing.co/demo> **Demoa:** <https://react.invoicing.co/demo>
+1 -1
View File
@@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
Invoice Ninja est une plate-forme de facturation auto-hébergée permettant de créer et d'envoyer des factures par courrier électronique, de suivre les paiements et les dépenses, ainsi que de chronométrer les tâches et projets facturables pour les clients. Invoice Ninja est une plate-forme de facturation auto-hébergée permettant de créer et d'envoyer des factures par courrier électronique, de suivre les paiements et les dépenses, ainsi que de chronométrer les tâches et projets facturables pour les clients.
**Version incluse:** 5.10.29~ynh1 **Version incluse:** 5.10.45~ynh1
**Démo:** <https://react.invoicing.co/demo> **Démo:** <https://react.invoicing.co/demo>
+1 -1
View File
@@ -19,7 +19,7 @@ NON debe editarse manualmente.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Versión proporcionada:** 5.10.29~ynh1 **Versión proporcionada:** 5.10.45~ynh1
**Demo:** <https://react.invoicing.co/demo> **Demo:** <https://react.invoicing.co/demo>
+1 -1
View File
@@ -19,7 +19,7 @@ Ini TIDAK boleh diedit dengan tangan.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Versi terkirim:** 5.10.29~ynh1 **Versi terkirim:** 5.10.45~ynh1
**Demo:** <https://react.invoicing.co/demo> **Demo:** <https://react.invoicing.co/demo>
+1 -1
View File
@@ -19,7 +19,7 @@ Hij mag NIET handmatig aangepast worden.
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Geleverde versie:** 5.10.29~ynh1 **Geleverde versie:** 5.10.45~ynh1
**Demo:** <https://react.invoicing.co/demo> **Demo:** <https://react.invoicing.co/demo>
+1 -1
View File
@@ -19,7 +19,7 @@
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**Поставляемая версия:** 5.10.29~ynh1 **Поставляемая версия:** 5.10.45~ynh1
**Демо-версия:** <https://react.invoicing.co/demo> **Демо-версия:** <https://react.invoicing.co/demo>
+1 -1
View File
@@ -19,7 +19,7 @@
Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients. Invoice Ninja is a self-hosted invoicing platform to create & email invoices, track payments and expenses, and time billable tasks & projects for clients.
**分发版本:** 5.10.29~ynh1 **分发版本:** 5.10.45~ynh1
**演示:** <https://react.invoicing.co/demo> **演示:** <https://react.invoicing.co/demo>
+2 -2
View File
@@ -1,2 +1,2 @@
* * * * * __APP__ cd __INSTALL_DIR__ && /usr/bin/php__PHPVERSION__ -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1 * * * * * __APP__ cd __INSTALL_DIR__ && /usr/bin/php__PHP_VERSION__ -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1
* * * * * __APP__ cd __INSTALL_DIR__ && /usr/bin/php__PHPVERSION__ -d register_argc_argv=On artisan queue:work --stop-when-empty >> /dev/null 2>&1 * * * * * __APP__ cd __INSTALL_DIR__ && /usr/bin/php__PHP_VERSION__ -d register_argc_argv=On artisan queue:work --stop-when-empty >> /dev/null 2>&1
-4
View File
@@ -1,4 +0,0 @@
; Additional php.ini defines, specific to this pool of workers.
php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M
+1 -1
View File
@@ -26,7 +26,7 @@ location ^~ __PATH__/ {
location ~ ^__PATH__/index\.php(/.*|)$ { location ~ ^__PATH__/index\.php(/.*|)$ {
fastcgi_split_path_info ^(.+?\.php)(/.*|)$; fastcgi_split_path_info ^(.+?\.php)(/.*|)$;
set $path_info $fastcgi_path_info; set $path_info $fastcgi_path_info;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
+6 -4
View File
@@ -5,7 +5,7 @@ name = "InvoiceNinja 5"
description.en = "Create and email invoices, track payments, expenses, and time tasks" description.en = "Create and email invoices, track payments, expenses, and time tasks"
description.fr = "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires" description.fr = "Créer et envoyer des factures par e-mail, suivre les paiements, les dépenses et les tâches horaires"
version = "5.10.29~ynh1" version = "5.10.45~ynh1"
maintainers = ["Sebastian Gumprich"] maintainers = ["Sebastian Gumprich"]
@@ -18,7 +18,8 @@ userdoc = "https://invoiceninja.github.io/"
code = "https://github.com/invoiceninja/invoiceninja" code = "https://github.com/invoiceninja/invoiceninja"
[integration] [integration]
yunohost = ">= 11.2.20" yunohost = ">= 11.2.30"
helpers_version = "2.1"
architectures = "all" architectures = "all"
multi_instance = true multi_instance = true
@@ -58,8 +59,8 @@ ram.runtime = "50M"
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.main]
url = "https://github.com/invoiceninja/invoiceninja/releases/download/v5.10.29/invoiceninja.tar" url = "https://github.com/invoiceninja/invoiceninja/releases/download/v5.10.45/invoiceninja.tar"
sha256 = "76a15b683a401f76583d1ee6f463ae08429757d28ead07571ff6372228f31d23" sha256 = "3a78af814b6da850173a1e7edf47823a1921e3472d058433e2eb870bf0474baa"
format = "tar.gz" format = "tar.gz"
in_subdir = false in_subdir = false
autoupdate.strategy = "latest_github_release" autoupdate.strategy = "latest_github_release"
@@ -68,6 +69,7 @@ ram.runtime = "50M"
[resources.system_user] [resources.system_user]
[resources.install_dir] [resources.install_dir]
group = "www-data:r-x"
[resources.permissions] [resources.permissions]
main.url = "/" main.url = "/"
+1 -13
View File
@@ -1,17 +1,5 @@
#!/bin/bash #!/bin/bash
#================================================= #=================================================
# COMMON VARIABLES # COMMON VARIABLES AND CUSTOM HELPERS
#=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#================================================= #=================================================
+8 -18
View File
@@ -1,45 +1,35 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= ynh_print_info "Declaring files to be backed up..."
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#================================================= #=================================================
# BACKUP THE APP MAIN DIR # BACKUP THE APP MAIN DIR
#================================================= #=================================================
ynh_backup --src_path="$install_dir" ynh_backup "$install_dir"
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
ynh_backup --src_path="/etc/cron.d/$app" ynh_backup "/etc/cron.d/$app"
#================================================= #=================================================
# BACKUP THE MYSQL DATABASE # BACKUP THE MYSQL DATABASE
#================================================= #=================================================
ynh_print_info --message="Backing up the MySQL database..." ynh_print_info "Backing up the MySQL database..."
ynh_mysql_dump_db --database="$db_name" > db.sql ynh_mysql_dump_db > db.sql
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
+6 -14
View File
@@ -1,33 +1,25 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
#================================================= #=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 ynh_script_progression "Updating NGINX web server configuration..."
ynh_change_url_nginx_config ynh_config_change_url_nginx
#=================================================
# SPECIFIC MODIFICATIONS
#================================================= #=================================================
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." --weight=1 ynh_script_progression "Updating configuration..."
ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_domain$new_path" --target_file="$install_dir/.env" ynh_replace --match="$old_domain$old_path" --replace="$new_domain$new_path" --file="$install_dir/.env"
ynh_store_file_checksum --file="$install_dir/.env" ynh_store_file_checksum "$install_dir/.env"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Change of URL completed for $app" ynh_script_progression "Change of URL completed for $app"
+20 -36
View File
@@ -1,11 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@@ -23,58 +17,50 @@ email="$(ynh_user_get_info --username=$admin --key=mail)"
#================================================= #=================================================
# STORE KEYS TO APP SETTINGS # STORE KEYS TO APP SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Storing secrets to app settings..." ynh_script_progression "Storing secrets to app settings..."
ynh_app_setting_set --app=$app --key=api_secret --value=$api_secret ynh_app_setting_set --key=api_secret --value=$api_secret
ynh_app_setting_set --app=$app --key=app_key --value=$app_key ynh_app_setting_set --key=app_key --value=$app_key
ynh_app_setting_set --app=$app --key=phantomjs_key --value=$phantomjs_key ynh_app_setting_set --key=phantomjs_key --value=$phantomjs_key
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Setting up source files..." --weight=1 ynh_script_progression "Setting up source files..."
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir"
chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 ynh_script_progression "Adding system configurations related to $app..."
# Create a dedicated PHP-FPM config ynh_config_add_phpfpm
ynh_add_fpm_config
# Create a dedicated nginx config ynh_config_add_nginx
ynh_add_nginx_config
#=================================================
# SPECIFIC SETUP
#================================================= #=================================================
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." --weight=1 ynh_script_progression "Updating configuration..."
ynh_add_config --template="default.env" --destination="$install_dir/.env" ynh_config_add --template="default.env" --destination="$install_dir/.env"
chmod 600 "$install_dir/.env"
chown $app:$app "$install_dir/.env"
#================================================= #=================================================
# BUILD THE APPLICATION # BUILD THE APPLICATION
#================================================= #=================================================
ynh_script_progression --message="Building the application..." --weight=1 ynh_script_progression "Building the application..."
pushd "$install_dir" pushd "$install_dir"
# Run the database migrations and initially fill the db # Run the database migrations and initially fill the db
php$phpversion artisan migrate:fresh --seed --no-interaction --verbose --force php$php_version artisan migrate:fresh --seed --no-interaction --verbose --force
php$phpversion artisan ninja:create-account --email $email --password "$password" --no-interaction --verbose php$php_version artisan ninja:create-account --email $email --password "$password" --no-interaction --verbose
php$phpversion artisan optimize --no-interaction --verbose php$php_version artisan optimize --no-interaction --verbose
php$phpversion artisan view:clear php$php_version artisan view:clear
php$phpversion artisan cache:clear php$php_version artisan cache:clear
popd popd
# invoiceninja creates some directories that need to be chmod'ed
chmod 750 "$install_dir" chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
@@ -82,14 +68,12 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# ADD A CRON JOB # ADD A CRON JOB
#================================================= #=================================================
ynh_script_progression --message="Adding a cron job..." --weight=1 ynh_script_progression "Adding a cron job..."
ynh_add_config --template="cron" --destination="/etc/cron.d/$app" ynh_config_add --template="cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Installation of $app completed" ynh_script_progression "Installation of $app completed"
+5 -16
View File
@@ -1,32 +1,21 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# REMOVE SYSTEM CONFIGURATIONS # REMOVE SYSTEM CONFIGURATIONS
#================================================= #=================================================
# REMOVE SYSTEMD SERVICE ynh_script_progression "Removing system configurations related to $app..."
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the dedicated nginx config ynh_config_remove_nginx
ynh_remove_nginx_config
# Remove the dedicated PHP-FPM config ynh_config_remove_phpfpm
ynh_remove_fpm_config
# Remove a cron file ynh_safe_rm "/etc/cron.d/$app"
ynh_secure_remove --file="/etc/cron.d/$app"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Removal of $app completed" ynh_script_progression "Removal of $app completed"
+12 -28
View File
@@ -1,59 +1,43 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=1 ynh_script_progression "Restoring the app main directory..."
ynh_restore_file --origin_path="$install_dir" ynh_restore "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# RESTORE THE MYSQL DATABASE # RESTORE THE MYSQL DATABASE
#================================================= #=================================================
ynh_script_progression --message="Restoring the MySQL database..." --weight=1 ynh_script_progression "Restoring the MySQL database..."
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql ynh_mysql_db_shell < ./db.sql
#================================================= #=================================================
# RESTORE SYSTEM CONFIGURATIONS # RESTORE SYSTEM CONFIGURATIONS
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION ynh_script_progression "Restoring system configurations related to $app..."
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/cron.d/$app" ynh_restore "/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
#=================================================
# GENERIC FINALIZATION
#================================================= #=================================================
# RELOAD NGINX AND PHP-FPM # RELOAD NGINX AND PHP-FPM
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 ynh_script_progression "Reloading NGINX web server and PHP-FPM..."
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemctl --service=php$php_version-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload ynh_systemctl --service=nginx --action=reload
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Restoration completed for $app" ynh_script_progression "Restoration completed for $app"
+37 -54
View File
@@ -1,99 +1,82 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# ENSURE BACKWARD COMPATIBILITY
#=================================================
ynh_script_progression "Ensuring backward compatibility..."
# Delete deprecated `firstname`/`lastname` settings. See upstream https://github.com/YunoHost/yunohost/pull/1516
ynh_app_setting_delete --key=email_firstname
ynh_app_setting_delete --key=email_lastname
ynh_app_setting_delete --key=email # also delete unnecessary duplicate of state storage
# Retrieve `$admin` user settings
ynh_app_setting_set_default --key=email_fullname --value="$(ynh_user_get_info --username=$admin --key=fullname)"
ynh_app_setting_set_default --key=email --value="$(ynh_user_get_info --username=$admin --key=mail)"
ynh_app_setting_set_default --key=api_secret --value="$(ynh_string_random --length=32)"
ynh_app_setting_set_default --key=app_key --value="$(ynh_string_random --length=32)"
ynh_app_setting_set_default --key=phantomjs_key --value="$(ynh_string_random --length=32)"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression "Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --full_replace --keep=".env public/storage"
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env public/storage"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 ynh_script_progression "Upgrading system configurations related to $app..."
# Create a dedicated PHP-FPM config ynh_config_add_phpfpm
ynh_add_fpm_config
# Create a dedicated NGINX config ynh_config_add_nginx
ynh_add_nginx_config
ynh_add_config --template="cron" --destination="/etc/cron.d/$app" ynh_config_add --template="cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
#=================================================
# ENSURE BACKWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring backward compatibility..." --weight=1
# Delete deprecated `firstname`/`lastname` settings. See upstream https://github.com/YunoHost/yunohost/pull/1516
ynh_app_setting_delete --app=$app --key=email_firstname
ynh_app_setting_delete --app=$app --key=email_lastname
ynh_app_setting_delete --app=$app --key=email # also delete unnecessary duplicate of state storage
# Retrieve `$admin` user settings
email_fullname="$(ynh_user_get_info --username=$admin --key=fullname)"
email="$(ynh_user_get_info --username=$admin --key=mail)"
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_script_progression "Updating configuration..."
ynh_add_config --template="default.env" --destination="$install_dir/.env" ynh_config_add --template="default.env" --destination="$install_dir/.env"
chmod 600 "$install_dir/.env"
chown $app:$app "$install_dir/.env"
#================================================= #=================================================
# UPGRADE DATABASE # UPGRADE DATABASE
#================================================= #=================================================
ynh_script_progression --message="Upgrading the database..." --weight=1 ynh_script_progression "Upgrading the database..."
pushd "$install_dir" pushd "$install_dir"
# Clear caches # Clear caches
# https://github.com/invoiceninja/invoiceninja/issues/7397 # https://github.com/invoiceninja/invoiceninja/issues/7397
#ynh_secure_remove --file=$install_dir/bootstrap/cache/ #ynh_safe_rm $install_dir/bootstrap/cache/
#ynh_secure_remove --file=$install_dir/storage/framework/cache/ #ynh_safe_rm $install_dir/storage/framework/cache/
#ynh_secure_remove --file=$install_dir/storage/framework/sessions/ #ynh_safe_rm $install_dir/storage/framework/sessions/
#mkdir -p $install_dir/bootstrap/cache/ $install_dir/storage/framework/cache/ $install_dir/storage/framework/sessions/ #mkdir -p $install_dir/bootstrap/cache/ $install_dir/storage/framework/cache/ $install_dir/storage/framework/sessions/
# clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377) # clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377)
php$phpversion artisan view:clear php$php_version artisan view:clear
php$phpversion artisan cache:clear php$php_version artisan cache:clear
# Run the database migrations # Run the database migrations
php$phpversion artisan migrate --force --no-interaction --verbose php$php_version artisan migrate --force --no-interaction --verbose
# Optimize the framework for better performance # Optimize the framework for better performance
php$phpversion artisan optimize --no-interaction --verbose php$php_version artisan optimize --no-interaction --verbose
# clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377) # clear cached stuff under /app/data/storage/framework (https://github.com/laravel/framework/issues/17377)
#php$phpversion artisan view:clear #php$php_version artisan view:clear
#php$phpversion artisan cache:clear #php$php_version artisan cache:clear
popd popd
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Upgrade of $app completed" ynh_script_progression "Upgrade of $app completed"
-49
View File
@@ -1,49 +0,0 @@
APP_NAME="Invoice Ninja"
APP_ENV=production
APP_KEY=__APP_KEY__
#API_SECRET=__API_SECRET__
APP_CIPHER=AES-256-CBC
APP_DEBUG=false
APP_LOCALE=en
APP_URL=https://__DOMAIN____PATH__
MULTI_DB_ENABLED=false
DB_HOST1=localhost
DB_DATABASE1=__DB_NAME__
DB_USERNAME1=__DB_USER__
DB_PASSWORD1=__DB_PASS__
DB_PORT1=3306
DEMO_MODE=false
BROADCAST_DRIVER=log
LOG_CHANNEL=stack
CACHE_DRIVER=file
QUEUE_CONNECTION=database
SESSION_DRIVER=file
SESSION_LIFETIME=120
#REDIS_HOST=127.0.0.1
#REDIS_PASSWORD=null
#REDIS_PORT=6379
REQUIRE_HTTPS=true
MAIL_MAILER=mail
MAIL_PORT=25
MAIL_ENCRYPTION=tls
MAIL_HOST=localhost
MAIL_USERNAME=
MAIL_FROM_NAME=
MAIL_FROM_ADDRESS=
MAIL_PASSWORD=
NINJA_ENVIRONMENT=selfhost
DB_CONNECTION=db-ninja-01
NODE_PATH=/opt/node_n/bin/node
NPM_PATH=/opt/node_n/bin/npm
PHANTOMJS_PDF_GENERATION=true
PHANTOMJS_KEY='a-demo-key-with-low-quota-per-ip-address'
PHANTOMJS_SECRET='your-secret-here'