1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/converse_ynh.git synced 2024-09-03 18:25:53 +02:00

Small fixes

This commit is contained in:
ericgaspar 2021-01-29 23:41:10 +01:00
parent 1a4c85f43b
commit 6ad698023b
No known key found for this signature in database
GPG key ID: 574F281483054D44
9 changed files with 80 additions and 37 deletions

View file

@ -3,7 +3,7 @@
; Manifest
domain="domain.tld" (DOMAIN)
path="/path" (PATH)
is_public="Yes" (PUBLIC|public=Yes|private=No)
is_public=1 (PUBLIC|public=1|private=0)
; Checks
pkg_linter=1
setup_sub_dir=1
@ -16,4 +16,12 @@
multi_instance=1
port_already_use=0
change_url=1
;;; Options
Email=
Notification=none
;;; Upgrade options
; commit=CommitHash
name=Name and date of the commit.
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&

55
issue_template.md Normal file
View file

@ -0,0 +1,55 @@
---
name: Bug report
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
---
**How to post a meaningful bug report**
1. *Read this whole template first.*
2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to Converse itself. Refer to its documentation or repository for help.*
- *When in doubt, post here and we will figure it out together.*
3. *Delete the italic comments as you write over them below, and remove this guide.*
---
### Describe the bug
*A clear and concise description of what the bug is.*
### Context
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
- If yes, please explain:
- Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
### Steps to reproduce
- *If you performed a command from the CLI, the command itself is enough. For example:*
```sh
sudo yunohost app install converse
```
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:*
1. *Go to '...'*
2. *Click on '...'*
3. *Scroll down to '...'*
4. *See error*
### Expected behavior
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
### Logs
*When an operation fails, YunoHost provides a simple way to share the logs.*
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
*If applicable and useful, add screenshots to help explain your problem.*

View file

@ -3,14 +3,14 @@
"id": "converse",
"packaging_format": 1,
"description": {
"en": "Web-based XMPP/Jabber chat client written in JavaScript ",
"fr": "Client de chat XMPP/Jabber basé sur le Web écrit en JavaScript "
"en": "Web-based XMPP/Jabber chat client written in JavaScript",
"fr": "Client de chat XMPP/Jabber basé sur le Web écrit en JavaScript"
},
"version": "7.0.4~ynh1",
"url": "http://conversejs.org/",
"license": "MPL-2.0",
"maintainer": {
"name": "eric_G",
"name": "",
"email": ""
},
"requirements": {

View file

@ -18,7 +18,7 @@ ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_print_info --message="Backing up Converse.js..."
ynh_print_info --message="Backing up Converse..."
app=$YNH_APP_INSTANCE_NAME
@ -46,4 +46,4 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for Converse.js. (YunoHost will then actually copy those files to the archive)."
ynh_print_info --message="Backup script completed for Converse. (YunoHost will then actually copy those files to the archive)."

View file

@ -34,7 +34,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up Converse.js before changing its URL (may take a while)..." --weight=2
ynh_script_progression --message="Backing up Converse before changing its URL (may take a while)..." --weight=2
# Backup the current version of the app
ynh_backup_before_upgrade
@ -104,4 +104,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for Converse.js" --last
ynh_script_progression --message="Change of URL completed for Converse" --last

View file

@ -56,7 +56,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
# Download, the source from sources folder
mkdir -p $final_path && cp -a ../sources/* $final_path
#=================================================
@ -97,4 +97,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of Converse.js completed" --last
ynh_script_progression --message="Installation of Converse completed" --last

View file

@ -23,7 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# REMOVE APP MAIN DIR
#=================================================
ynh_script_progression --message="Removing Converse.js main directory..." --weight=3
ynh_script_progression --message="Removing Converse main directory..." --weight=3
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
@ -40,4 +40,4 @@ ynh_remove_nginx_config
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of Converse.js completed" --last
ynh_script_progression --message="Removal of Converse completed" --last

View file

@ -46,7 +46,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring Converse.js main directory..." --weight=2
ynh_script_progression --message="Restoring Converse main directory..." --weight=2
ynh_restore_file --origin_path="$final_path"
@ -70,4 +70,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for Converse.js" --last
ynh_script_progression --message="Restoration completed for Converse" --last

View file

@ -26,30 +26,10 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=1
is_public=1
elif [ "$is_public" = "No" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=0
is_public=0
fi
# If final_path doesn't exist, create it
if [ -z "$final_path" ]; then
final_path=/var/www/$app
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up Converse.js before upgrading (may take a while)..." --weight=3
ynh_script_progression --message="Backing up Converse before upgrading (may take a while)..." --weight=3
# Backup the current version of the app
ynh_backup_before_upgrade
@ -68,7 +48,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=4
# Download, check integrity, uncompress and patch the source from app.src
# Download, the source from sources folder
mkdir -p $final_path && cp -a ../sources/* $final_path
fi
@ -98,4 +78,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of Converse.js completed" --last
ynh_script_progression --message="Upgrade of Converse completed" --last