-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global upgrade #68
Global upgrade #68
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that, packages will be awesome! ❤️
I've made a couple of cosmetic comments/proposals.
# Find a free port | ||
port=$(ynh_find_port 8095) | ||
# Open this port | ||
yunohost firewall allow --no-upnp TCP $port 2>&1 | ||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe comment on why we're using the ynh_exec_warn_less
helper here...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean why we don't want to have stdout ? Or why we were using 2>&1 ?
Co-Authored-By: maniackcrudelis <maniackcrudelis@users.noreply.github.com>
Co-Authored-By: maniackcrudelis <maniackcrudelis@users.noreply.github.com>
Co-Authored-By: maniackcrudelis <maniackcrudelis@users.noreply.github.com>
Bump If you want to modify some texts, please just do it. |
|
||
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" | ||
|
||
#================================================= | ||
# BACKUP THE PHP-FPM CONFIGURATION | ||
#================================================= | ||
ynh_print_info "Backing up php-fpm configuration..." | ||
|
||
ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, uh, can't we just have block like
#=================================================
# BACKUP CONFIGURATION FILES
#=================================================
ynh_print_info "Backing configuration files..."
# Nginx
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
# php-fpm
ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf"
# logrotate
ynh_backup "/etc/logrotate.d/$app"
# systemd
ynh_backup "/etc/systemd/system/$app.service"
# cron job
ynh_backup "/etc/cron.d/$app"
It looks a bit weird to me to have 5 huge blocks just to have so many similar "small" instructions (those literally just backup one file each time) with the mysql backup (which actually does takes some time) in the middle ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, I actually prefer the current way because it clearer when you're looking for a part of the backup in the script.
But that's not really important.
Also, I thought, when writing those lines, that it could be interesting for the final user to know what exactly will be backup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh but that's just way too low level ... I mean, in the spirit of YunoHost, maybe a tech-savvy user will know what nginx and php-fpm will refer to, but a regular user shouldn't need to know what those are ...
Imho the purpose of those messages are essentially to let the user know "what the machine is doing right now that is taking so much time". But displaying "5 different messages with technical terms for stuff that lasted basically 0 seconds" looks more like debug than info ... sure it might help a technical user in knowing what's happening under the hood, but it tends to frustrate non-technical user and (from my experience at least) when seeing this they will say "this is so complicated, I have no idea what those mean".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As usual, I'm more in favor of using real name for things than to hide what's really going on.
So I'd rather prefer to add those message to explain what's going to be backup instead of thinking that it's too complicated, so we should hide that from our users.
If an user doesn't understand what is it, he will simply ignore it. For other, It's really useful to know what's going on.
Applied a few tweaks (I removed a few Feel free to discuss ¯\_(ツ)_/¯ |
Ok for me. |
Do we agree on the last changes about ynh_print_info ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(for me that's okay, but I'm not really in the app team so 😉 )
Not that much changes, comparing to what I was expecting...
The next stable release will be more interesting, with many new helpers.
Feel free to modify any text in
ynh_print_info