eb97b3632a
helpers: ynh_remove_systemd_config: Also remove the systemd service from YunoHost.
...
Every app or almost will do that, because it doesn't make sense to remove the systemd config but not the associated yunohost configuration.
This will clean up a bit the remove scripts.
2024-06-28 11:52:56 +02:00
Alexandre Aubin
997388dc79
helpers2.1: fix __PATH__/ handling
2024-06-25 14:16:04 +02:00
Alexandre Aubin
e3bebeac98
helpers2.1: typo in getopts
2024-06-24 22:13:16 +02:00
Alexandre Aubin
2af4c157d9
helpers/mongo: less noisy output when checking the avx flag is here in /proc/cpuinfo
2024-06-24 21:35:35 +02:00
Alexandre Aubin
0aad13cd2f
helpers2.1: oopsies in apt helper
2024-06-24 19:11:28 +02:00
Alexandre Aubin
2895d4d99b
helpers: Misc cleaning / reorganizing to prepare new doc
2024-06-24 17:42:37 +02:00
Alexandre Aubin
1fb80e5d24
helpers2.1: drop ynh_apps helper because only a single app is using it ...
2024-06-24 06:09:58 +02:00
Alexandre Aubin
30467f8bc3
helpers2.1: fix bad syntax in ynh_app_upstream_version
2024-06-23 20:04:17 +02:00
Alexandre Aubin
d8c3ff4c8a
helpers2.1: forgot to propagate the 'goenv latest' fix from helpers v1
2024-06-23 16:35:58 +02:00
Alexandre Aubin
2b1f74268f
helpers2.1: var rename / cosmetic etc for nodejs/ruby/go version and install directories
2024-06-23 15:21:25 +02:00
Alexandre Aubin
5f6df6a859
helpers2.1: for some reason sudo -E doesn't preserve PATH even though it's exported, so we gotta explicitly use --preserve-env=PATH
2024-06-23 14:49:11 +02:00
Alexandre Aubin
b3409729a6
helpers2.1: when using ynh_systemctl to reload/start/restart a service with a wait_until and it timesout, handle it as a filure rather than keep going
2024-06-23 14:36:55 +02:00
Alexandre Aubin
9298738d06
helpers2.1: display 100 lines instead of 20 in CI context when service fails to start
2024-06-23 14:30:57 +02:00
Alexandre Aubin
262453f132
helpers2.1: change default timeout of ynh_systemctl to 60s instead of 300s
2024-06-23 14:27:37 +02:00
Alexandre Aubin
d4857834f3
helpers2.1: sudo -u$app -> sudo -u $app
2024-06-23 14:13:17 +02:00
Alexandre Aubin
3942ea12ae
helpers2.1: fix ynh_config_add_logrotate when no arg is passed
2024-06-23 14:08:31 +02:00
Alexandre Aubin
be3df69326
Merge pull request #1873 from YunoHost/ynh_app_setting_set_default
...
helpers: add a new ynh_app_setting_set_default to replace the unecessarily complex 'if [ -z ${foo:-} ]' trick
2024-06-23 00:59:26 +02:00
Alexandre Aubin
7caf7e8b3e
Merge pull request #1874 from YunoHost/rework_fpm_settings_madness
...
helpers2.1: rework the fpm usage/footprint madness
2024-06-23 00:59:00 +02:00
Alexandre Aubin
e558513609
helpers2.1: fix positional arg parsing in ynh_psql_create_user
2024-06-22 22:52:31 +02:00
Alexandre Aubin
3d728d90ce
helpers2.1: rework the fpm usage/footprint madness
2024-06-22 01:59:18 +02:00
Alexandre Aubin
1b5074d857
helpers: add a new ynh_app_setting_set_default to replace the unecessarily complex 'if [ ${foo:-} ]' trick
2024-06-21 18:30:05 +02:00
Alexandre Aubin
dd8db1883a
helpers2.1: drop unused 'local source' mechanism from ynh_setup_source
2024-06-21 16:26:14 +02:00
Alexandre Aubin
06c8fbc881
logs: misc ad-hoc tweaks to limit the noise in log sharing
2024-06-21 16:26:07 +02:00
Alexandre Aubin
41b958113a
helpers2.1: unbound var @_@
2024-06-20 19:06:14 +02:00
e0a9bafde2
helpers.v2.1: Add ynh_in_ci_tests to check if the scripts are running in CI or not
2024-06-20 16:37:22 +02:00
Alexandre Aubin
eab36d069d
helper2.1: refactor composer helper again: workdir is $install_dir unless $composer_workdir is defined. ynh_composer_install only downloads composer. ynh_composer_exec runs composer command as $app unless composer_user=root is defined prior to calling the helper
2024-06-20 16:15:57 +02:00
Alexandre Aubin
b47aedc932
helpers: remove god forsaken clumsy node_update cron job >_>
2024-06-20 14:02:56 +02:00
Alexandre Aubin
f22c6ec3e9
helpers2.1: ynh_systemd_action -> ynh_systemctl
2024-06-20 13:47:05 +02:00
Alexandre Aubin
d9b9aa1884
helpers2.1: use positional args for file checksum helpers
2024-06-20 13:44:09 +02:00
Alexandre Aubin
b8a1a3a660
helpers2.1: ynh_config_remove_systemd now uses positional
2024-06-19 23:45:37 +02:00
Alexandre Aubin
6b6580a919
helpers2.1: further simplify logging helpers by removing the --message (ynh_script_progression too, no more args except the message)
2024-06-19 23:40:53 +02:00
Alexandre Aubin
11e2b6d63c
helpers2.1: ynh_systemd_action '--line_match' -> '--wait_until'
2024-06-19 23:19:19 +02:00
Alexandre Aubin
218bf107fb
helpers2.1: rename everything again, i.e. ynh_{nodejs|ruby|composer|...}_install/remove (to have a proper ynh_{tech}_ prefix like we have for mysql/psql helpers) + same idea for ynh_config_add_{nginx|phpfpm|systemd|...} instead of ynh_add_foo_config
2024-06-19 17:06:22 +02:00
Alexandre Aubin
8f8070983d
helpers2.1: rework the 'apt' helper: effectivement call them ynh_install/remove_apt_dependencies (instead of 'app_dependencies'...), remove unused stuff, bloat and unecessary non-linear flows...
2024-06-19 04:07:07 +02:00
Alexandre Aubin
5a6a8e6c73
helpers2.1: fix unecessary change in ynh_read_manifest, key shouldnt need to be prefixed with .
2024-06-16 14:12:11 +02:00
Alexandre Aubin
800f93d12e
helpers2.1: further simplify mysql/postgresql helper: no keyword arg, remove ynh_foo_setup_db and ynh_foo_remove_db (the other helpers are enough), replace ynh_foosql_connect_as/ynh_foosql_execute* with a single ynh_foosql_db_shell that reads stdin
2024-06-13 12:39:05 +02:00
Alexandre Aubin
3584e6a5b1
helpers2.1: remove legacy ynh_add_app_dependencies
2024-06-13 11:28:59 +02:00
Alexandre Aubin
50a4d08add
helpers2.1: fixes after tests on the battlefield
2024-06-13 01:00:52 +02:00
Alexandre Aubin
d501131b34
helpers2.1: autorename phpversion to php_version for consistency with nodejs_version, ruby_version, ...
2024-06-12 22:05:55 +02:00
Alexandre Aubin
66f667e48a
helpers2.1: in ynh_setup_source, remove the underused sources/extra_files/sourceid/ mechanism (basically the only apps with these files manually cp stuff) + move the sources/patches/ mechanism to just patches/
2024-06-11 22:55:30 +02:00
Alexandre Aubin
47b2a5695f
helpers2.1: replace ynh_check_app_version_changed with a much simpler ynh_app_upstream_version_changed that can directly be used with 'if ynh_app_upstream_version_changed' instead of the current mess
2024-06-11 19:27:33 +02:00
Alexandre Aubin
66508d5fd6
helpers2.1: ynh_exec_warn_less -> ynh_hide_warnings
2024-06-11 18:41:37 +02:00
Alexandre Aubin
a8cd94d3db
helpers2.1: rework the nodejs/ruby/go mess: export the appropriate extended PATH to be able to call npm/node/ruby/gem/go directly (no ynh_foo anymore). No more ynh_use_foo either, it's just automatically called at the end of ynh_install_foo. Also rework the ynh_foo_load_PATH variable to PATH_with_foo, such that we shall write Enviroment="PATH=__PATH_WITH_FOO__" in the systemd conf to be more explicit
2024-06-11 18:20:22 +02:00
Alexandre Aubin
b4b420d694
helpers2.1: ynh_exec_as $app -> ynh_exec_as_app (with -E option in sudo)
2024-06-11 16:20:28 +02:00
Alexandre Aubin
fca26ead78
helpers2.1: fix unecessary warnings + print_info in ruby, to also hopefully stop people from slapping an ynh_exec_warn_less in front of ynh_install_ruby
2024-06-11 03:16:03 +02:00
Alexandre Aubin
eb8ce2088b
helpers2.1: go: add --quiet to goenv install + redirect stderr to stdout such that people don't slap an ynh_exec_warn_less in front of ynh_install_go x_x
2024-06-11 03:10:24 +02:00
Alexandre Aubin
0c319cbeba
helpers2.1: further simplify ynh_backup/restore: use a single positional arg. --is_big behavior is replaced by checking if the path is $data_dir (or a child) or /var/log/$app. --not_mandatory for restore is implied using the same check, or should be replaced by || true on the package side for the few cases where it's related to other stuff than the data dir or log dir
2024-06-11 02:31:51 +02:00
Alexandre Aubin
c5815fb1ef
helpers2.1: simplify the logrotate mess: rename to ynh_add/remove_logrotate_config, use positional args, --specific_user is useless, we just need to make sure the parent dir has no +w on group...
2024-06-11 02:31:51 +02:00
Alexandre Aubin
480366d5a1
helpers2.1: in fact, let's use positional args for ynh_safe_rm because having --target everywhere is boring as hell
2024-06-11 02:31:21 +02:00
Alexandre Aubin
50eea8fc14
helpers2.1: reintroduce the old ynh_restore as ynh_restore_everything because some apps are using it @_@
2024-06-10 22:47:29 +02:00