diff --git a/check_process b/check_process index 44ff7c5..056ea7b 100644 --- a/check_process +++ b/check_process @@ -1,16 +1,11 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) + domain="domain.tld" + path="/path" + admin="john" language="fr" - is_public=1 (PUBLIC|public=1|private=0) - password="pass" + is_public=1 + password="1Strong-Password" ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..c91285e --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,2 @@ +* Any known limitations, constrains or stuff not working, such as (but not limited to): + * LDAP and HTTP auth are supported through plugins diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/screenshot.png b/doc/screenshots/screenshot.png similarity index 100% rename from screenshot.png rename to doc/screenshots/screenshot.png diff --git a/manifest.json b/manifest.json index 7a087e3..7a0186b 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,14 @@ "fr": "Système de ticket de support open source" }, "version": "1.15.2~ynh2", - "url": "https://osticket.com/", + "url": "https://osticket.com", + "upstream": { + "license": "GPL-2.0-or-later", + "website": "https://osticket.com", + "demo": "http://www.ostickethacks.com/demo/demo_info.php", + "userdoc": "https://docs.osticket.com", + "code": "https://github.com/osTicket/osTicket" + }, "license": "GPL-2.0-or-later", "maintainer": { "name": "yalh76" diff --git a/scripts/backup b/scripts/backup index c4314ac..89da2d0 100644 --- a/scripts/backup +++ b/scripts/backup @@ -58,7 +58,7 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # SPECIFIC BACKUP #================================================= -# BACKUP A CRON FILE +# BACKUP VARIOUS FILES #================================================= ynh_backup --src_path="/etc/cron.d/$app" diff --git a/scripts/install b/scripts/install index 874883c..e30d5c3 100644 --- a/scripts/install +++ b/scripts/install @@ -68,7 +68,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Configuring system user..." # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # CREATE A MYSQL DATABASE @@ -134,9 +134,9 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a config file..." +ynh_script_progression --message="Adding a configuration file..." -cp -f "../conf/ost-sampleconfig.php" "$final_path/include/ost-config.php" +ynh_add_config --template="../conf/ost-sampleconfig.php" --destination="$final_path/include/ost-config.php" chmod 666 "$final_path/include/ost-config.php" chown $app:www-data "$final_path/include/ost-config.php" @@ -206,6 +206,8 @@ ynh_secure_remove --file="$final_path/setup" chmod 400 "$final_path/include/ost-config.php" chown $app:www-data "$final_path/include/ost-config.php" +ynh_store_file_checksum --file="$final_path/include/ost-config.php" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/remove b/scripts/remove index 516968d..5fba8f1 100644 --- a/scripts/remove +++ b/scripts/remove @@ -66,9 +66,9 @@ ynh_remove_fpm_config #================================================= # SPECIFIC REMOVE #================================================= -# REMOVE THE CRON FILE +# REMOVE VARIOUS FILES #================================================= -ynh_script_progression --message="Removing the cron file..." +ynh_script_progression --message="Removing various files..." # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" diff --git a/scripts/restore b/scripts/restore index feeee23..39fd74a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -59,7 +59,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Recreating the dedicated system user..." # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # RESTORE THE APP MAIN DIR @@ -75,7 +75,7 @@ chown -R $app:www-data "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Restoring PHP-FPM configuration..." +ynh_script_progression --message="Restoring the PHP-FPM configuration..." ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" @@ -85,13 +85,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC RESTORATION -#================================================= -# RESTORE THE CRON FILE -#================================================= -ynh_script_progression --message="Restoring the cron file..." - -ynh_restore_file --origin_path="/etc/cron.d/$app" - #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -109,6 +102,13 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +#================================================= +# RESTORE VARIOUS FILES +#================================================= +ynh_script_progression --message="Restoring various files..." + +ynh_restore_file --origin_path="/etc/cron.d/$app" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 25d21fb..9e86e49 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,8 +23,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -config_file=$final_path/include/ost-config.php - #================================================= # CHECK VERSION #================================================= @@ -32,18 +30,6 @@ ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." - -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -60,13 +46,25 @@ ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." + +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # CREATE DEDICATED USER #================================================= ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -80,7 +78,7 @@ then mkdir $tmpdir/plugins rsync -a "$final_path/include/plugins" "$tmpdir/." - rsync -a "$config_file" "$tmpdir/." + rsync -a "$final_path/include/ost-config.php" "$tmpdir/." ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src @@ -136,7 +134,9 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a config file..." +ynh_script_progression --message="Updating a configuration file..." + +ynh_store_file_checksum --file="$final_path/include/ost-config.php" chmod 400 "$final_path/include/ost-config.php" chown $app:www-data "$final_path/include/ost-config.php" @@ -189,15 +189,6 @@ ynh_script_progression --message="Setting the cron file..." ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= -ynh_script_progression --message="Storing the config file checksum..." - -ynh_backup_if_checksum_is_different --file="$config_file" -# Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum --file="$config_file" - #================================================= # GENERIC FINALIZATION #=================================================