diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index bf7a87a..c2d97de --- a/README.md +++ b/README.md @@ -27,11 +27,11 @@ Modifiez le fichier /var/www/qr/options.inc.php à votre guise ## Caractéristiques spécifiques YunoHost -#### Support multi-utilisateurs +### Support multi-utilisateurs Il n'y a aucune forme d'authentification dans l'application. -#### Supported architectures +### Supported architectures * x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/qr%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/qr/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/qr%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/qr/) @@ -48,8 +48,8 @@ Il n'y a aucune forme d'authentification dans l'application. ## Liens * Signaler un bug dans le paquet YunoHost : https://code.antopie.org/miraty/qr_ynh/issues - * Signaler un bug dans le logiciel source : https://code.antopie.org/miraty/qr/issues - * Dépôt de l'application principale : https://code.antopie.org/miraty/qr/ + * Signaler un bug dans le logiciel source : https://code.antopie.org/miraty/libreqr/issues + * Dépôt de l'application principale : https://code.antopie.org/miraty/libreqr/ * Site web de YunoHost : https://yunohost.org/ --- diff --git a/conf/app.src b/conf/app.src old mode 100644 new mode 100755 index 29e16a6..138e132 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://code.antopie.org/miraty/qr/archive/1.1.0.zip -SOURCE_SUM=b409c5ec4cc98968bbe46152fd33b83aca7337205c81c1b0cf73c4203ecb9a9f +SOURCE_URL=https://code.antopie.org/miraty/libreqr/archive/master.zip +SOURCE_SUM=b8ef7510344b74881ba719a2290c089246439c48bb2f1dac757d213d173f016e SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf old mode 100644 new mode 100755 diff --git a/manifest.json b/manifest.json old mode 100644 new mode 100755 index efa9fd7..34b6316 --- a/manifest.json +++ b/manifest.json @@ -1,18 +1,18 @@ { - "name": "Generateur de codes QR", + "name": "LibreQR", "id": "qr", "packaging_format": 1, "description": { "en": "A QR codes generator", "fr": "Un générateur de codes QR" }, - "version": "1.0~ynh1", - "url": "https://code.antopie.org/miraty/qr/", - "license": "Apache-2.0", + "version": "1.2.0~ynh2", + "url": "https://code.antopie.org/miraty/libreqr/", + "license": "AGPL-3.0-or-later", "maintainer": { "name": "Miraty", - "email": "miraty@antopie.org", - "url": "https://www.antopie.org" + "email": "miraty+ynh@antopie.org", + "url": "https://miraty.antopie.org" }, "requirements": { "yunohost": ">= 3.6" @@ -28,8 +28,8 @@ "name": "domain", "type": "domain", "ask": { - "en": "Choose a domain for QR code generator", - "fr": "Choisissez un domaine pour le Générateur de codes QR" + "en": "Choose a domain for LibreQR", + "fr": "Choisissez un domaine pour LibreQR" }, "example": "michu.home" }, @@ -37,8 +37,8 @@ "name": "path", "type": "path", "ask": { - "en": "Choose a path for QR code generator", - "fr": "Choisissez un chemin pour le Générateur de codes QR" + "en": "Choose a path for LibreQR", + "fr": "Choisissez un chemin pour LibreQR" }, "example": "/qr", "default": "/qr" @@ -51,8 +51,8 @@ "fr": "Est-ce une application publique ?" }, "help": { - "en": "Can the QR code generator be used by everyone?", - "fr": "Le générateur de codes QR peut-il être utilisé par tout le monde ?" + "en": "Can LibreQR be used by everyone?", + "fr": "LibreQR peut-elle être utilisée par tout le monde ?" }, "default": true } diff --git a/screenshot.png b/screenshot.png index ae23962..30d1450 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/scripts/_common.sh b/scripts/_common.sh old mode 100644 new mode 100755 diff --git a/scripts/backup b/scripts/backup index 71a7a80..e9f5b01 100755 --- a/scripts/backup +++ b/scripts/backup @@ -30,7 +30,7 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) +#db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= # STANDARD BACKUP STEPS @@ -55,36 +55,6 @@ ynh_script_progression --message="Backing up php-fpm configuration..." --time -- ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf" -#================================================= -# BACKUP THE MYSQL DATABASE -#================================================= -#ynh_script_progression --message="Backing up the MySQL database..." --time --weight=1 - -#ynh_mysql_dump_db --database="$db_name" > db.sql - -#================================================= -# BACKUP FAIL2BAN CONFIGURATION -#================================================= -#ynh_script_progression --message="Backing up fail2ban configuration..." --time --weight=1 - -#ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" -#ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" - -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= -#ynh_script_progression --message="Backing up logrotate configuration..." --time --weight=1 - -#ynh_backup --src_path="/etc/logrotate.d/$app" - -#================================================= -# BACKUP A CRON FILE -#================================================= - -#ynh_backup --src_path="/etc/cron.d/$app" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/change_url b/scripts/change_url old mode 100644 new mode 100755 index 9336b50..997a61b --- a/scripts/change_url +++ b/scripts/change_url @@ -53,12 +53,6 @@ fi #================================================= # STANDARD MODIFICATIONS #================================================= -# STOP SYSTEMD SERVICE -#================================================= -#ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 - -#ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" - #================================================= # MODIFY URL IN NGINX CONF #================================================= @@ -88,27 +82,6 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= - -# Mofifie la nouvelle URL dans le fichier de conf options.inc.php -ynh_replace_string --match_string="\$cheminInstall = \"https://$old_domain/$old_path\";" --replace_string="\$cheminInstall = \"https://$new_domain/$new_path\";" --target_file=$final_path/options.inc.php - -#================================================= -# END SPECIFIC MODIFICATIONS -#================================================= - - -#================================================= -# GENERIC FINALISATION -#================================================= -# START SYSTEMD SERVICE -#================================================= -#ynh_script_progression --message="Starting a systemd service..." --time --weight=1 - -#ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" - #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/install b/scripts/install index f095e1b..a437421 100755 --- a/scripts/install +++ b/scripts/install @@ -123,17 +123,6 @@ ynh_print_info "Configuring php-fpm..." # Create a dedicated php-fpm config ynh_add_fpm_config -#================================================= -# MODIFY A CONFIG FILE -#================================================= - -ynh_script_progression --message="MODIFY A CONFIG FILE" --time --weight=1 - -### `ynh_replace_string` is used to replace a string in a file. -### (It's compatible with sed regular expressions syntax) - -ynh_replace_string --match_string="\$cheminInstall = \"https://example.org/\";" --replace_string="\$cheminInstall = \"https://$domain/$path_url\";" --target_file=$final_path/options.inc.php - #================================================= # GENERIC FINALIZATION #================================================= @@ -145,17 +134,8 @@ ynh_replace_string --match_string="\$cheminInstall = \"https://example.org/\";" ### that really need such authorization. # Set permissions to app files -chown -R root: $final_path -chown -R root:$app $final_path/temp -chmod -R g+w $final_path/temp - -#================================================= -# SETUP FAIL2BAN -#================================================= -#ynh_script_progression --message="Configuring fail2ban..." --time --weight=1 - -# Create a dedicated fail2ban config -#ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" +chown -R root:$app $final_path +chmod -R g+w $final_path #================================================= # SETUP SSOWAT diff --git a/scripts/remove b/scripts/remove index 2e03392..9390010 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,46 +17,12 @@ ynh_script_progression --message="Loading installation settings..." --time --wei app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) -port=$(ynh_app_setting_get --app=$app --key=port) +#port=$(ynh_app_setting_get --app=$app --key=port) final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # STANDARD REMOVE #================================================= -# REMOVE SERVICE FROM ADMIN PANEL -#================================================= - -# Remove a service from the admin panel, added by `yunohost service add` -#if ynh_exec_warn_less yunohost service status $app >/dev/null -#then -# ynh_script_progression --message="Removing $app service..." --time --weight=1 -# yunohost service remove $app -#fi - -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -#ynh_script_progression --message="Stopping and removing the systemd service..." --time --weight=1 - -# Remove the dedicated systemd config -#ynh_remove_systemd_config - -#================================================= -# REMOVE THE MYSQL DATABASE -#================================================= -#ynh_script_progression --message="Removing the MySQL database..." --time --weight=1 - -# 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..." --time --weight=1 - -# Remove metapackage and its dependencies -#ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -81,47 +47,6 @@ ynh_script_progression --message="Removing php-fpm configuration..." --time --we # Remove the dedicated php-fpm config ynh_remove_fpm_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -#ynh_script_progression --message="Removing logrotate configuration..." --time --weight=1 - -# Remove the app-specific logrotate config -#ynh_remove_logrotate - -#================================================= -# CLOSE A PORT -#================================================= - -if yunohost firewall list | grep -q "\- $port$" -then - ynh_script_progression --message="Closing port $port..." - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - -#================================================= -# REMOVE FAIL2BAN CONFIGURATION -#================================================= -#ynh_script_progression --message="Removing fail2ban configuration..." --time --weight=1 - -# Remove the dedicated fail2ban config -#ynh_remove_fail2ban_config - -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE THE CRON FILE -#================================================= - -# Remove a cron file -#ynh_secure_remove --file="/etc/cron.d/$app" - -# Remove a directory securely -#ynh_secure_remove --file="/etc/$app/" - -# Remove the log files -#ynh_secure_remove --file="/var/log/$app/" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 1fdce31..18f6c21 100755 --- a/scripts/restore +++ b/scripts/restore @@ -69,10 +69,9 @@ ynh_system_user_create --username=$app # RESTORE USER RIGHTS #================================================= -# Restore permissions on app files -chown -R root: $final_path -chown -R root:$app $final_path/temp -chmod -R g+w $final_path/temp +# Set permissions to app files +chown -R root:$app $final_path +chmod -R g+w $final_path #================================================= # RESTORE THE PHP-FPM CONFIGURATION @@ -80,52 +79,6 @@ chmod -R g+w $final_path/temp ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf" -#================================================= -# RESTORE FAIL2BAN CONFIGURATION -#================================================= -#ynh_script_progression --message="Restoring the fail2ban configuration..." --time --weight=1 - -#ynh_restore_file "/etc/fail2ban/jail.d/$app.conf" -#ynh_restore_file "/etc/fail2ban/filter.d/$app.conf" -#ynh_systemd_action --action=restart --service_name=fail2ban - -#================================================= -# SPECIFIC RESTORATION -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -#ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1 - -# Define and install dependencies -#ynh_install_app_dependencies $pkg_dependencies - -#================================================= -# RESTORE THE MYSQL DATABASE -#================================================= -#ynh_script_progression --message="Restoring the MySQL database..." --time --weight=1 - -#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 - -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= - -#yunohost service add $app --log "/var/log/$app/$app.log" - -#================================================= -# RESTORE THE CRON FILE -#================================================= - -#ynh_restore_file --origin_path="/etc/cron.d/$app" - -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= - -#ynh_restore_file --origin_path="/etc/logrotate.d/$app" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2cf3c96..a0b7e5d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,12 +126,6 @@ ynh_script_progression --message="Upgrading php-fpm configuration..." --time --w # Create a dedicated php-fpm config ynh_add_fpm_config -#================================================= -# SPECIFIC UPGRADE -#================================================= -# ... -#================================================= - #================================================= # STORE THE CONFIG FILE CHECKSUM #================================================= @@ -142,25 +136,15 @@ ynh_backup_if_checksum_is_different --file="$final_path/options.inc.php" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$final_path/options.inc.php" - #================================================= # GENERIC FINALIZATION -#================================================= -# UPGRADE FAIL2BAN -#================================================= -#ynh_script_progression --message="Reconfiguring fail2ban..." --time --weight=1 - -# Create a dedicated fail2ban config -#ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" - #================================================= # SECURE FILES AND DIRECTORIES #================================================= -# Set permissions on app files -chown -R root: $final_path -chown -R root:$app $final_path/temp -chmod -R g+w $final_path/temp +# Set permissions to app files +chown -R root:$app $final_path +chmod -R g+w $final_path #================================================= # SETUP SSOWAT