diff --git a/check_process b/check_process index b3cdc64..4bd08b6 100644 --- a/check_process +++ b/check_process @@ -8,7 +8,7 @@ password="1Strong-Password" ; Checks pkg_linter=1 - setup_sub_dir=1 + setup_sub_dir=0 setup_root=1 setup_nourl=0 setup_private=1 diff --git a/conf/app.src b/conf/app.src index fa384d4..c5b41c0 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.3.1/invoiceninja.zip -SOURCE_SUM=dbcd9fb8db31bc155e425d4c1548f14b23937f36fd3e01ed598057e11a6ef31d +SOURCE_URL=https://github.com/invoiceninja/invoiceninja/releases/download/v5.3.39/invoiceninja.zip +SOURCE_SUM=a8d644c4e4a6c3f6f9a1492af8818ea27ac3c1a8dfa32ca2deefe6089dcc9109 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index ff18ab9..e5ec69e 100644 --- a/manifest.json +++ b/manifest.json @@ -35,12 +35,6 @@ "name": "domain", "type": "domain" }, - { - "name": "path", - "type": "path", - "example": "/", - "default": "/" - }, { "name": "admin", "type": "user" diff --git a/scripts/_common.sh b/scripts/_common.sh index 9388454..53032f1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,9 +8,8 @@ YNH_PHP_VERSION="7.4" # dependencies used by the app #pkg_dependencies="phantomjs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget" -pkg_dependencies="phantomjs" -extra_php_dependencies="php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-pdo php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-mysql" +pkg_dependencies="phantomjs php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-pdo php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-mysql" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index c1f9152..69e0409 100755 --- a/scripts/install +++ b/scripts/install @@ -21,7 +21,7 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH +path_url="/" admin=$YNH_APP_ARG_ADMIN language=$YNH_APP_ARG_LANGUAGE is_public=$YNH_APP_ARG_IS_PUBLIC @@ -115,7 +115,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." # Create a dedicated php-fpm config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= @@ -133,7 +133,6 @@ pushd "$final_path" popd ynh_app_setting_set --app=$app --key=app_key --value=$app_key - chmod 400 "$final_path/.env" chown $app:$app "$final_path/.env" diff --git a/scripts/remove b/scripts/remove index a46c348..563f4eb 100755 --- a/scripts/remove +++ b/scripts/remove @@ -32,14 +32,6 @@ ynh_script_progression --message="Removing the MySQL database..." # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." - -# Remove metapackage and its dependencies -#ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -61,9 +53,17 @@ ynh_remove_nginx_config #================================================= ynh_script_progression --message="Removing PHP-FPM configuration..." -# Remove the dedicated php-fpm config +# Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # SPECIFIC REMOVE #================================================= diff --git a/scripts/restore b/scripts/restore index 0875bdd..2028b66 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,11 +33,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -ynh_script_progression --message="Validating restoration parameters..." - #================================================= # STANDARD RESTORATION STEPS #================================================= @@ -73,8 +68,6 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -ynh_add_fpm_config --package="$extra_php_dependencies" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c3c65f4..cb7e9e3 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,6 +21,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) @@ -33,7 +34,6 @@ email_firstname=$(ynh_app_setting_get --app=$app --key=email_firstname) email_lastname=$(ynh_app_setting_get --app=$app --key=email_lastname) email=$(ynh_app_setting_get --app=$app --key=email) - #================================================= # CHECK VERSION #================================================= @@ -74,12 +74,6 @@ then ynh_setup_source --dest_dir="$final_path" --keep=".env" fi -# FIXME: this should be managed by the core in the future -# Here, as a packager, you may have to tweak the ownerhsip/permissions -# such that the appropriate users (e.g. maybe www-data) can access -# files in some cases. -# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder - -# this will be treated as a security issue. chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" @@ -107,15 +101,14 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # PHP-FPM CONFIGURATION #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." -# Create a dedicated php-fpm config -ynh_add_fpm_config --package="$extra_php_dependencies" +# Create a dedicated PHP-FPM config +ynh_add_fpm_config #================================================= # UPDATE A CONFIG FILE