From ab41d3be68575b15cc51205a603aebbe435beb4b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 25 Jun 2024 12:33:04 +0000 Subject: [PATCH] [CI] Update app helpers/resources for debian/11.2.17.1 --- .../packaging_app_manifest_resources.md | 2 +- .../packaging_app_scripts_helpers.md | 807 ++++++++++++------ .../packaging_app_scripts_helpers_v21.md | 524 ++++++------ 3 files changed, 802 insertions(+), 531 deletions(-) diff --git a/pages/06.contribute/10.packaging_apps/10.manifest/10.appresources/packaging_app_manifest_resources.md b/pages/06.contribute/10.packaging_apps/10.manifest/10.appresources/packaging_app_manifest_resources.md index 9d772a92..454aeb96 100644 --- a/pages/06.contribute/10.packaging_apps/10.manifest/10.appresources/packaging_app_manifest_resources.md +++ b/pages/06.contribute/10.packaging_apps/10.manifest/10.appresources/packaging_app_manifest_resources.md @@ -7,7 +7,7 @@ routes: default: '/packaging_apps_resources' --- -Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/doc/generate_resource_doc.py) on 24/06/2024 (YunoHost version 11.2.17) +Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/doc/generate_resource_doc.py) on 25/06/2024 (YunoHost version 11.2.17.1) --- diff --git a/pages/06.contribute/10.packaging_apps/20.scripts/10.helpers/packaging_app_scripts_helpers.md b/pages/06.contribute/10.packaging_apps/20.scripts/10.helpers/packaging_app_scripts_helpers.md index e1e94924..c49c47d6 100644 --- a/pages/06.contribute/10.packaging_apps/20.scripts/10.helpers/packaging_app_scripts_helpers.md +++ b/pages/06.contribute/10.packaging_apps/20.scripts/10.helpers/packaging_app_scripts_helpers.md @@ -7,7 +7,7 @@ routes: default: '/packaging_apps_helpers' --- -Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/doc/generate_helper_doc.py) on 24/06/2024 (YunoHost version 11.2.17) +Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/doc/generate_helper_doc.py) on 25/06/2024 (YunoHost version 11.2.17.1) @@ -21,7 +21,7 @@ Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/2d #### ynh_setup_source -
Download, check integrity, uncompress and patch the source from app.src +[details summary="Download, check integrity, uncompress and patch the source from app.src" class="helper-card-subtitle text-muted"] **Usage**: `ynh_setup_source --dest_dir=dest_dir [--source_id=source_id] [--keep="file1 file2"] [--full_replace]` @@ -90,8 +90,8 @@ The helper will: Requires YunoHost version 2.6.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/sources#L67) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/sources#L67) +[/details] --- @@ -106,7 +106,7 @@ Requires YunoHost version 2.6.4 or higher. #### ynh_use_nodejs -
Load the version of node for an app, and set variables. +[details summary="Load the version of node for an app, and set variables." class="helper-card-subtitle text-muted"] **Usage**: `ynh_use_nodejs` @@ -151,12 +151,12 @@ You will replace __YNH_NODE__ with $ynh_node Requires YunoHost version 2.7.12 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/nodejs#L52) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/nodejs#L52) +[/details] #### ynh_install_nodejs -
Install a specific version of nodejs +[details summary="Install a specific version of nodejs" class="helper-card-subtitle text-muted"] **Usage**: `ynh_install_nodejs --nodejs_version=nodejs_version` @@ -174,12 +174,12 @@ Refer to `ynh_use_nodejs` for more information about available commands and vari Requires YunoHost version 2.7.12 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/nodejs#L94) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/nodejs#L94) +[/details] #### ynh_remove_nodejs -
Remove the version of node used by the app. +[details summary="Remove the version of node used by the app." class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_nodejs` @@ -191,8 +191,8 @@ This helper will check if another app uses the same version of node. Requires YunoHost version 2.7.12 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/nodejs#L164) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/nodejs#L164) +[/details] --- @@ -201,7 +201,7 @@ Requires YunoHost version 2.7.12 or higher. #### ynh_use_ruby -
Load the version of Ruby for an app, and set variables. +[details summary="Load the version of Ruby for an app, and set variables." class="helper-card-subtitle text-muted"] **Usage**: `ynh_use_ruby` @@ -240,12 +240,12 @@ one other variable is also available Requires YunoHost version 3.2.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/ruby#L53) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/ruby#L53) +[/details] #### ynh_install_ruby -
Install a specific version of Ruby +[details summary="Install a specific version of Ruby" class="helper-card-subtitle text-muted"] **Usage**: `ynh_install_ruby --ruby_version=ruby_version` @@ -266,12 +266,12 @@ to rbenv shims (e.g. $RBENV_ROOT/shims/bundle) Requires YunoHost version 3.2.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/ruby#L98) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/ruby#L98) +[/details] #### ynh_remove_ruby -
Remove the version of Ruby used by the app. +[details summary="Remove the version of Ruby used by the app." class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_ruby` @@ -279,12 +279,12 @@ Requires YunoHost version 3.2.2 or higher. This helper will also cleanup Ruby versions -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/ruby#L240) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/ruby#L240) +[/details] #### ynh_cleanup_ruby -
Remove no more needed versions of Ruby used by the app. +[details summary="Remove no more needed versions of Ruby used by the app." class="helper-card-subtitle text-muted"] **Usage**: `ynh_cleanup_ruby` @@ -294,8 +294,8 @@ and uninstall them If no app uses Ruby, rbenv will be also removed. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/ruby#L265) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/ruby#L265) +[/details] --- @@ -304,7 +304,7 @@ If no app uses Ruby, rbenv will be also removed. #### ynh_use_go -
Load the version of Go for an app, and set variables. +[details summary="Load the version of Go for an app, and set variables." class="helper-card-subtitle text-muted"] **Usage**: `ynh_use_go` @@ -343,12 +343,12 @@ one other variable is also available Requires YunoHost version 3.2.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/go#L54) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/go#L54) +[/details] #### ynh_install_go -
Install a specific version of Go +[details summary="Install a specific version of Go" class="helper-card-subtitle text-muted"] **Usage**: `ynh_install_go --go_version=go_version` @@ -369,12 +369,12 @@ to goenv shims (e.g. $goenv_ROOT/shims/bundle) Requires YunoHost version 3.2.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/go#L96) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/go#L96) +[/details] #### ynh_remove_go -
Remove the version of Go used by the app. +[details summary="Remove the version of Go used by the app." class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_go` @@ -382,12 +382,12 @@ Requires YunoHost version 3.2.2 or higher. This helper will also cleanup Go versions -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/go#L185) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/go#L185) +[/details] #### ynh_cleanup_go -
Remove no more needed versions of Go used by the app. +[details summary="Remove no more needed versions of Go used by the app." class="helper-card-subtitle text-muted"] **Usage**: `ynh_cleanup_go` @@ -397,8 +397,8 @@ and uninstall them If no app uses Go, goenv will be also removed. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/go#L208) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/go#L208) +[/details] --- @@ -407,7 +407,7 @@ If no app uses Go, goenv will be also removed. #### ynh_composer_exec -
Execute a command with Composer +[details summary="Execute a command with Composer" class="helper-card-subtitle text-muted"] **Usage**: `ynh_composer_exec [--phpversion=phpversion] [--workdir=$install_dir] --commands="commands"` @@ -420,12 +420,12 @@ If no app uses Go, goenv will be also removed. Requires YunoHost version 4.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/composer#L16) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/composer#L16) +[/details] #### ynh_install_composer -
Install and initialize Composer in the given directory +[details summary="Install and initialize Composer in the given directory" class="helper-card-subtitle text-muted"] **Usage**: `ynh_install_composer [--phpversion=phpversion] [--workdir=$install_dir] [--install_args="--optimize-autoloader"] [--composerversion=composerversion]` @@ -439,8 +439,8 @@ Requires YunoHost version 4.2 or higher. Requires YunoHost version 4.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/composer#L48) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/composer#L48) +[/details] --- @@ -455,7 +455,7 @@ Requires YunoHost version 4.2 or higher. #### ynh_mysql_connect_as -
Open a connection as a user +[details summary="Open a connection as a user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mysql_connect_as --user=user --password=password [--database=database]` @@ -479,12 +479,12 @@ Requires YunoHost version 4.2 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mysql#L15) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mysql#L15) +[/details] #### ynh_mysql_execute_as_root -
Execute a command as root user +[details summary="Execute a command as root user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mysql_execute_as_root --sql=sql [--database=database]` @@ -496,12 +496,12 @@ Requires YunoHost version 2.2.4 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mysql#L36) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mysql#L36) +[/details] #### ynh_mysql_execute_file_as_root -
Execute a command from a file as root user +[details summary="Execute a command from a file as root user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mysql_execute_file_as_root --file=file [--database=database]` @@ -513,12 +513,12 @@ Requires YunoHost version 2.2.4 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mysql#L60) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mysql#L60) +[/details] #### ynh_mysql_dump_db -
Dump a database +[details summary="Dump a database" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mysql_dump_db --database=database` @@ -533,8 +533,8 @@ Requires YunoHost version 2.2.4 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mysql#L128) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mysql#L128) +[/details] --- @@ -543,7 +543,7 @@ Requires YunoHost version 2.2.4 or higher. #### ynh_psql_connect_as -
Open a connection as a user +[details summary="Open a connection as a user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_psql_connect_as --user=user --password=password [--database=database]` @@ -567,12 +567,12 @@ Requires YunoHost version 2.2.4 or higher. Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/postgresql#L18) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/postgresql#L18) +[/details] #### ynh_psql_execute_as_root -
Execute a command as root user +[details summary="Execute a command as root user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_psql_execute_as_root --sql=sql [--database=database]` @@ -584,12 +584,12 @@ Requires YunoHost version 3.5.0 or higher. Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/postgresql#L39) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/postgresql#L39) +[/details] #### ynh_psql_execute_file_as_root -
Execute a command from a file as root user +[details summary="Execute a command from a file as root user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_psql_execute_file_as_root --file=file [--database=database]` @@ -601,12 +601,12 @@ Requires YunoHost version 3.5.0 or higher. Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/postgresql#L64) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/postgresql#L64) +[/details] #### ynh_psql_dump_db -
Dump a database +[details summary="Dump a database" class="helper-card-subtitle text-muted"] **Usage**: `ynh_psql_dump_db --database=database` @@ -621,12 +621,12 @@ Requires YunoHost version 3.5.0 or higher. Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/postgresql#L135) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/postgresql#L135) +[/details] #### ynh_psql_database_exists -
Check if a psql database exists +[details summary="Check if a psql database exists" class="helper-card-subtitle text-muted"] **Usage**: `ynh_psql_database_exists --database=database | exit: Return 1 if the database doesn't exist, 0 otherwise` @@ -638,8 +638,8 @@ Requires YunoHost version 3.5.0 or higher. Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/postgresql#L192) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/postgresql#L192) +[/details] --- @@ -648,7 +648,7 @@ Requires YunoHost version 3.5.0 or higher. #### ynh_mongo_exec -
Execute a mongo command +[details summary="Execute a mongo command" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_exec [--user=user] [--password=password] [--authenticationdatabase=authenticationdatabase] [--database=database] [--host=host] [--port=port] --command="command" [--eval]` @@ -668,12 +668,12 @@ Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mongodb#L19) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mongodb#L19) +[/details] #### ynh_mongo_dump_db -
Dump a database +[details summary="Dump a database" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_dump_db --database=database` @@ -688,12 +688,12 @@ Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mongodb#L136) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mongodb#L136) +[/details] #### ynh_mongo_database_exists -
Check if a mongo database exists +[details summary="Check if a mongo database exists" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_database_exists --database=database | exit: Return 1 if the database doesn't exist, 0 otherwise` @@ -705,12 +705,12 @@ Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mongodb#L181) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mongodb#L181) +[/details] #### ynh_mongo_restore_db -
Restore a database +[details summary="Restore a database" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_restore_db --database=database` @@ -723,12 +723,12 @@ Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mongodb#L205) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mongodb#L205) +[/details] #### ynh_mongo_setup_db -
Create a database, an user and its password. Then store the password in the app's config +[details summary="Create a database, an user and its password. Then store the password in the app's config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_setup_db --db_user=user --db_name=name [--db_pwd=pwd]` @@ -744,12 +744,12 @@ It will also be stored as "mongopwd" into the app settings. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mongodb#L248) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mongodb#L248) +[/details] #### ynh_mongo_remove_db -
Remove a database if it exists, and the associated user +[details summary="Remove a database if it exists, and the associated user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_remove_db --db_user=user --db_name=name` @@ -761,12 +761,12 @@ It will also be stored as "mongopwd" into the app settings. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mongodb#L276) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mongodb#L276) +[/details] #### ynh_install_mongo -
Install MongoDB and integrate MongoDB service in YunoHost +[details summary="Install MongoDB and integrate MongoDB service in YunoHost" class="helper-card-subtitle text-muted"] **Usage**: `ynh_install_mongo [--mongo_version=mongo_version]` @@ -777,14 +777,14 @@ It will also be stored as "mongopwd" into the app settings. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mongodb#L301) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mongodb#L301) +[/details] #### ynh_remove_mongo -
Remove MongoDB +[details summary="Remove MongoDB Only remove the MongoDB service integration in YunoHost for now -if MongoDB package as been removed +if MongoDB package as been removed" class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_mongo` @@ -792,8 +792,8 @@ if MongoDB package as been removed -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/mongodb#L344) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/mongodb#L344) +[/details] --- @@ -802,25 +802,25 @@ if MongoDB package as been removed #### ynh_redis_get_free_db -
get the first available redis database +[details summary="get the first available redis database" class="helper-card-subtitle text-muted"] **Usage**: `ynh_redis_get_free_db` **Returns**: the database number to use -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/redis#L7) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/redis#L7) +[/details] #### ynh_redis_remove_db -
Create a master password and set up global settings -Please always call this script in install and restore scripts +[details summary="Create a master password and set up global settings +Please always call this script in install and restore scripts" class="helper-card-subtitle text-muted"] **Usage**: `ynh_redis_remove_db database` **Arguments**: - `database`: the database to erase -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/redis#L36) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/redis#L36) +[/details] --- @@ -835,7 +835,7 @@ Please always call this script in install and restore scripts #### ynh_add_config -
Create a dedicated config file from a template +[details summary="Create a dedicated config file from a template" class="helper-card-subtitle text-muted"] **Usage**: `ynh_add_config --template="template" --destination="destination"` @@ -900,12 +900,12 @@ into the app settings when configuration is done. Requires YunoHost version 4.1.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/templating#L56) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/templating#L56) +[/details] #### ynh_read_var_in_file -
Get a value from heterogeneous file (yaml, json, php, python...) +[details summary="Get a value from heterogeneous file (yaml, json, php, python...)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_read_var_in_file --file=PATH --key=KEY` @@ -944,12 +944,12 @@ Example of line this helpers can managed correctly Requires YunoHost version 4.3 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/templating#L222) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/templating#L222) +[/details] #### ynh_write_var_in_file -
Set a value into heterogeneous file (yaml, json, php, python...) +[details summary="Set a value into heterogeneous file (yaml, json, php, python...)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_write_var_in_file --file=PATH --key=KEY --value=VALUE` @@ -963,8 +963,8 @@ Requires YunoHost version 4.3 or higher. Requires YunoHost version 4.3 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/templating#L300) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/templating#L300) +[/details] --- @@ -973,7 +973,7 @@ Requires YunoHost version 4.3 or higher. #### ynh_add_nginx_config -
Create a dedicated nginx config +[details summary="Create a dedicated nginx config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_add_nginx_config` @@ -992,12 +992,12 @@ location Requires YunoHost version 4.1.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/nginx#L19) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/nginx#L19) +[/details] #### ynh_remove_nginx_config -
Remove the dedicated nginx config +[details summary="Remove the dedicated nginx config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_nginx_config` @@ -1005,12 +1005,12 @@ Requires YunoHost version 4.1.0 or higher. Requires YunoHost version 2.7.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/nginx#L41) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/nginx#L41) +[/details] #### ynh_change_url_nginx_config -
Regen the nginx config in a change url context +[details summary="Regen the nginx config in a change url context" class="helper-card-subtitle text-muted"] **Usage**: `ynh_change_url_nginx_config` @@ -1018,8 +1018,8 @@ Requires YunoHost version 2.7.2 or higher. Requires YunoHost version 11.1.9 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/nginx#L52) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/nginx#L52) +[/details] --- @@ -1028,7 +1028,7 @@ Requires YunoHost version 11.1.9 or higher. #### ynh_add_fpm_config -
Create a dedicated PHP-FPM config +[details summary="Create a dedicated PHP-FPM config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_add_fpm_config` @@ -1093,12 +1093,12 @@ Set as 'high', the process manager will be set at 'static'. There will be always Requires YunoHost version 4.1.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/php#L70) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/php#L70) +[/details] #### ynh_remove_fpm_config -
Remove the dedicated PHP-FPM config +[details summary="Remove the dedicated PHP-FPM config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_fpm_config` @@ -1106,8 +1106,8 @@ Requires YunoHost version 4.1.0 or higher. Requires YunoHost version 2.7.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/php#L284) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/php#L284) +[/details] --- @@ -1116,7 +1116,7 @@ Requires YunoHost version 2.7.2 or higher. #### ynh_add_systemd_config -
Create a dedicated systemd config +[details summary="Create a dedicated systemd config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_add_systemd_config [--service=service] [--template=template]` @@ -1133,12 +1133,12 @@ format and how placeholders are replaced with actual variables. Requires YunoHost version 4.1.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/systemd#L15) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/systemd#L15) +[/details] #### ynh_remove_systemd_config -
Remove the dedicated systemd config +[details summary="Remove the dedicated systemd config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_systemd_config [--service=service]` @@ -1149,12 +1149,12 @@ Requires YunoHost version 4.1.0 or higher. Requires YunoHost version 2.7.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/systemd#L38) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/systemd#L38) +[/details] #### ynh_systemd_action -
Start (or other actions) a service, print a log in case of failure and optionnaly wait until the service is completely started +[details summary="Start (or other actions) a service, print a log in case of failure and optionnaly wait until the service is completely started" class="helper-card-subtitle text-muted"] **Usage**: `ynh_systemd_action [--service_name=service_name] [--action=action] [ [--line_match="line to match"] [--log_path=log_path] [--timeout=300] [--length=20] ]` @@ -1170,8 +1170,8 @@ Requires YunoHost version 2.7.2 or higher. Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/systemd#L67) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/systemd#L67) +[/details] --- @@ -1180,7 +1180,7 @@ Requires YunoHost version 3.5.0 or higher. #### ynh_add_fail2ban_config -
Create a dedicated fail2ban config (jail and filter conf files) +[details summary="Create a dedicated fail2ban config (jail and filter conf files)" class="helper-card-subtitle text-muted"] **Usage**: `1: ynh_add_fail2ban_config --logpath=log_file --failregex=filter [--max_retry=max_retry] [--ports=ports] 2: ynh_add_fail2ban_config --use_template` @@ -1239,12 +1239,12 @@ fail2ban-regex /var/log/YOUR_LOG_FILE_PATH /etc/fail2ban/filter.d/YOUR_APP.conf Requires YunoHost version 4.1.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/fail2ban#L58) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/fail2ban#L58) +[/details] #### ynh_remove_fail2ban_config -
Remove the dedicated fail2ban config (jail and filter conf files) +[details summary="Remove the dedicated fail2ban config (jail and filter conf files)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_fail2ban_config` @@ -1252,8 +1252,8 @@ Requires YunoHost version 4.1.0 or higher. Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/fail2ban#L130) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/fail2ban#L130) +[/details] --- @@ -1262,7 +1262,7 @@ Requires YunoHost version 3.5.0 or higher. #### ynh_use_logrotate -
Use logrotate to manage the logfile +[details summary="Use logrotate to manage the logfile" class="helper-card-subtitle text-muted"] **Usage**: `ynh_use_logrotate [--logfile=/log/file] [--specific_user=user/group]` @@ -1277,12 +1277,12 @@ If no `--logfile` is provided, `/var/log/$app` will be used as default. Requires YunoHost version 2.6.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logrotate#L15) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logrotate#L15) +[/details] #### ynh_remove_logrotate -
Remove the app's logrotate config. +[details summary="Remove the app's logrotate config." class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_logrotate` @@ -1290,8 +1290,8 @@ Requires YunoHost version 2.6.4 or higher. Requires YunoHost version 2.6.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logrotate#L99) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logrotate#L99) +[/details] --- @@ -1306,7 +1306,7 @@ Requires YunoHost version 2.6.4 or higher. #### ynh_local_curl -
Curl abstraction to help with POST requests to local pages (such as installation forms) +[details summary="Curl abstraction to help with POST requests to local pages (such as installation forms)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_local_curl "page_uri" "key1=value1" "key2=value2" ...` @@ -1326,12 +1326,12 @@ For multiple calls, cookies are persisted between each call for the same app Requires YunoHost version 2.6.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/utils#L90) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/utils#L90) +[/details] #### ynh_secure_remove -
Remove a file or a directory securely +[details summary="Remove a file or a directory securely" class="helper-card-subtitle text-muted"] **Usage**: `ynh_secure_remove --file=path_to_remove` @@ -1342,12 +1342,12 @@ Requires YunoHost version 2.6.4 or higher. Requires YunoHost version 2.6.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/utils#L173) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/utils#L173) +[/details] #### ynh_read_manifest -
Read the value of a key in a ynh manifest file +[details summary="Read the value of a key in a ynh manifest file" class="helper-card-subtitle text-muted"] **Usage**: `ynh_read_manifest --manifest="manifest.json" --manifest_key="key"` @@ -1361,12 +1361,12 @@ Requires YunoHost version 2.6.4 or higher. Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/utils#L207) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/utils#L207) +[/details] #### ynh_app_upstream_version -
Read the upstream version from the manifest or `$YNH_APP_MANIFEST_VERSION` +[details summary="Read the upstream version from the manifest or `$YNH_APP_MANIFEST_VERSION`" class="helper-card-subtitle text-muted"] **Usage**: `ynh_app_upstream_version [--manifest="manifest.json"]` @@ -1385,12 +1385,12 @@ For example, if the manifest contains `4.3-2~ynh3` the function will return `4.3 Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/utils#L250) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/utils#L250) +[/details] #### ynh_check_app_version_changed -
Checks the app version to upgrade with the existing app version and returns: +[details summary="Checks the app version to upgrade with the existing app version and returns:" class="helper-card-subtitle text-muted"] **Usage**: `ynh_check_app_version_changed` @@ -1403,12 +1403,12 @@ of it, when it's not needed Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/utils#L302) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/utils#L302) +[/details] #### ynh_compare_current_package_version -
Compare the current package version against another version given as an argument. +[details summary="Compare the current package version against another version given as an argument." class="helper-card-subtitle text-muted"] **Usage**: `ynh_compare_current_package_version --comparison (lt|le|eq|ne|ge|gt) --version ` @@ -1434,12 +1434,12 @@ fi Requires YunoHost version 3.8.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/utils#L332) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/utils#L332) +[/details] #### ynh_user_exists -
Check if a YunoHost user exists +[details summary="Check if a YunoHost user exists" class="helper-card-subtitle text-muted"] **Usage**: `ynh_user_exists --username=username` @@ -1454,12 +1454,12 @@ Requires YunoHost version 3.8.0 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/utils#L414) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/utils#L414) +[/details] #### ynh_user_get_info -
Retrieve a YunoHost user information +[details summary="Retrieve a YunoHost user information" class="helper-card-subtitle text-muted"] **Usage**: `ynh_user_get_info --username=username --key=key` @@ -1475,12 +1475,12 @@ Requires YunoHost version 2.2.4 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/utils#L435) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/utils#L435) +[/details] #### ynh_user_list -
Get the list of YunoHost users +[details summary="Get the list of YunoHost users" class="helper-card-subtitle text-muted"] **Usage**: `ynh_user_list` @@ -1492,8 +1492,8 @@ Requires YunoHost version 2.2.4 or higher. Requires YunoHost version 2.4.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/utils#L455) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/utils#L455) +[/details] --- @@ -1502,7 +1502,7 @@ Requires YunoHost version 2.4.0 or higher. #### ynh_app_setting_get -
Get an application setting +[details summary="Get an application setting" class="helper-card-subtitle text-muted"] **Usage**: `ynh_app_setting_get --app=app --key=key` @@ -1514,12 +1514,12 @@ Requires YunoHost version 2.4.0 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/setting#L10) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/setting#L10) +[/details] #### ynh_app_setting_set -
Set an application setting +[details summary="Set an application setting" class="helper-card-subtitle text-muted"] **Usage**: `ynh_app_setting_set --app=app --key=key --value=value` @@ -1532,12 +1532,12 @@ Requires YunoHost version 2.2.4 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/setting#L36) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/setting#L36) +[/details] #### ynh_app_setting_set_default -
Set an application setting but only if the "$key" variable ain't set yet +[details summary="Set an application setting but only if the "$key" variable ain't set yet" class="helper-card-subtitle text-muted"] **Usage**: `ynh_app_setting_set_default --app=app --key=key --value=value` @@ -1560,12 +1560,12 @@ fi Requires YunoHost version 11.1.16 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/setting#L73) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/setting#L73) +[/details] #### ynh_app_setting_delete -
Delete an application setting +[details summary="Delete an application setting" class="helper-card-subtitle text-muted"] **Usage**: `ynh_app_setting_delete --app=app --key=key` @@ -1577,8 +1577,8 @@ Requires YunoHost version 11.1.16 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/setting#L98) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/setting#L98) +[/details] --- @@ -1587,7 +1587,7 @@ Requires YunoHost version 2.2.4 or higher. #### ynh_string_random -
Generate a random string +[details summary="Generate a random string" class="helper-card-subtitle text-muted"] **Usage**: `ynh_string_random [--length=string_length]` @@ -1603,12 +1603,12 @@ Requires YunoHost version 2.2.4 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/string#L13) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/string#L13) +[/details] #### ynh_replace_string -
Substitute/replace a string (or expression) by another in a file +[details summary="Substitute/replace a string (or expression) by another in a file" class="helper-card-subtitle text-muted"] **Usage**: `ynh_replace_string --match_string=match_string --replace_string=replace_string --target_file=target_file` @@ -1624,12 +1624,12 @@ sub-expressions can be used (see sed manual page for more information) Requires YunoHost version 2.6.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/string#L40) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/string#L40) +[/details] #### ynh_replace_special_string -
Substitute/replace a special string by another in a file +[details summary="Substitute/replace a special string by another in a file" class="helper-card-subtitle text-muted"] **Usage**: `ynh_replace_special_string --match_string=match_string --replace_string=replace_string --target_file=target_file` @@ -1645,8 +1645,8 @@ characters, you can't use some regular expressions and sub-expressions. Requires YunoHost version 2.7.7 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/string#L71) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/string#L71) +[/details] --- @@ -1655,7 +1655,7 @@ Requires YunoHost version 2.7.7 or higher. #### ynh_backup -
Add a file or a directory to the list of paths to backup +[details summary="Add a file or a directory to the list of paths to backup" class="helper-card-subtitle text-muted"] **Usage**: `ynh_backup --src_path=src_path [--dest_path=dest_path] [--is_big] [--not_mandatory]` @@ -1719,12 +1719,12 @@ Requires YunoHost version 2.4.0 or higher. Requires YunoHost version 3.5.0 or higher for the argument `--not_mandatory` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/backup#L64) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/backup#L64) +[/details] #### ynh_restore -
Restore all files that were previously backuped in a core backup script or app backup script +[details summary="Restore all files that were previously backuped in a core backup script or app backup script" class="helper-card-subtitle text-muted"] **Usage**: `ynh_restore` @@ -1732,12 +1732,12 @@ Requires YunoHost version 3.5.0 or higher for the argument `--not_mandatory` Requires YunoHost version 2.6.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/backup#L179) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/backup#L179) +[/details] #### ynh_restore_file -
Restore a file or a directory +[details summary="Restore a file or a directory" class="helper-card-subtitle text-muted"] **Usage**: `ynh_restore_file --origin_path=origin_path [--dest_path=dest_path] [--not_mandatory]` @@ -1776,12 +1776,12 @@ Requires YunoHost version 2.6.4 or higher. Requires YunoHost version 3.5.0 or higher for the argument --not_mandatory -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/backup#L238) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/backup#L238) +[/details] #### ynh_store_file_checksum -
Calculate and store a file checksum into the app settings +[details summary="Calculate and store a file checksum into the app settings" class="helper-card-subtitle text-muted"] **Usage**: `ynh_store_file_checksum --file=file` @@ -1794,12 +1794,12 @@ $app should be defined when calling this helper Requires YunoHost version 2.6.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/backup#L306) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/backup#L306) +[/details] #### ynh_backup_if_checksum_is_different -
Verify the checksum and backup the file if it's different +[details summary="Verify the checksum and backup the file if it's different" class="helper-card-subtitle text-muted"] **Usage**: `ynh_backup_if_checksum_is_different --file=file` @@ -1815,12 +1815,12 @@ modified config files. Requires YunoHost version 2.6.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/backup#L357) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/backup#L357) +[/details] #### ynh_delete_file_checksum -
Delete a file checksum from the app settings +[details summary="Delete a file checksum from the app settings" class="helper-card-subtitle text-muted"] **Usage**: `ynh_delete_file_checksum --file=file` @@ -1833,8 +1833,8 @@ $app should be defined when calling this helper Requires YunoHost version 3.3.1 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/backup#L397) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/backup#L397) +[/details] --- @@ -1843,7 +1843,7 @@ Requires YunoHost version 3.3.1 or higher. #### ynh_die -
Print a message to stderr and exit +[details summary="Print a message to stderr and exit" class="helper-card-subtitle text-muted"] **Usage**: `ynh_die --message=MSG [--ret_code=RETCODE]` @@ -1855,12 +1855,12 @@ Requires YunoHost version 3.3.1 or higher. Requires YunoHost version 2.4.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L10) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L10) +[/details] #### ynh_print_info -
Display a message in the 'INFO' logging category +[details summary="Display a message in the 'INFO' logging category" class="helper-card-subtitle text-muted"] **Usage**: `ynh_print_info --message="Some message"` @@ -1871,12 +1871,12 @@ Requires YunoHost version 2.4.0 or higher. Requires YunoHost version 3.2.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L30) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L30) +[/details] #### ynh_print_warn -
Print a warning on stderr +[details summary="Print a warning on stderr" class="helper-card-subtitle text-muted"] **Usage**: `ynh_print_warn --message="Text to print"` @@ -1887,12 +1887,12 @@ Requires YunoHost version 3.2.0 or higher. Requires YunoHost version 3.2.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L56) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L56) +[/details] #### ynh_print_err -
Print an error on stderr +[details summary="Print an error on stderr" class="helper-card-subtitle text-muted"] **Usage**: `ynh_print_err --message="Text to print"` @@ -1903,12 +1903,12 @@ Requires YunoHost version 3.2.0 or higher. Requires YunoHost version 3.2.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L73) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L73) +[/details] #### ynh_exec_err -
Execute a command and print the result as an error +[details summary="Execute a command and print the result as an error" class="helper-card-subtitle text-muted"] **Usage**: `ynh_exec_err your command and args` @@ -1921,12 +1921,12 @@ Note that you should NOT quote the command but only prefix it with ynh_exec_err Requires YunoHost version 3.2.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L92) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L92) +[/details] #### ynh_exec_warn -
Execute a command and print the result as a warning +[details summary="Execute a command and print the result as a warning" class="helper-card-subtitle text-muted"] **Usage**: `ynh_exec_warn your command and args` @@ -1939,12 +1939,12 @@ Note that you should NOT quote the command but only prefix it with ynh_exec_warn Requires YunoHost version 3.2.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L113) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L113) +[/details] #### ynh_exec_warn_less -
Execute a command and force the result to be printed on stdout +[details summary="Execute a command and force the result to be printed on stdout" class="helper-card-subtitle text-muted"] **Usage**: `ynh_exec_warn_less your command and args` @@ -1957,12 +1957,12 @@ Note that you should NOT quote the command but only prefix it with ynh_exec_warn Requires YunoHost version 3.2.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L134) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L134) +[/details] #### ynh_exec_quiet -
Execute a command and redirect stdout in /dev/null +[details summary="Execute a command and redirect stdout in /dev/null" class="helper-card-subtitle text-muted"] **Usage**: `ynh_exec_quiet your command and args` @@ -1975,12 +1975,12 @@ Note that you should NOT quote the command but only prefix it with ynh_exec_warn Requires YunoHost version 3.2.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L155) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L155) +[/details] #### ynh_exec_fully_quiet -
Execute a command and redirect stdout and stderr in /dev/null +[details summary="Execute a command and redirect stdout and stderr in /dev/null" class="helper-card-subtitle text-muted"] **Usage**: `ynh_exec_quiet your command and args` @@ -1993,12 +1993,12 @@ Note that you should NOT quote the command but only prefix it with ynh_exec_quie Requires YunoHost version 3.2.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L176) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L176) +[/details] #### ynh_exec_and_print_stderr_only_if_error -
Execute a command and redirect stderr in /dev/null. Print stderr on error. +[details summary="Execute a command and redirect stderr in /dev/null. Print stderr on error." class="helper-card-subtitle text-muted"] **Usage**: `ynh_exec_and_print_stderr_only_if_error your command and args` @@ -2011,12 +2011,12 @@ Note that you should NOT quote the command but only prefix it with ynh_exec_and_ Requires YunoHost version 11.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L197) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L197) +[/details] #### ynh_script_progression -
Print a progress bar showing the progression of an app script +[details summary="Print a progress bar showing the progression of an app script" class="helper-card-subtitle text-muted"] **Usage**: `ynh_script_progression --message=message [--weight=weight] [--time]` @@ -2030,13 +2030,13 @@ Requires YunoHost version 11.2 or higher. Requires YunoHost version 3.5.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L257) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L257) +[/details] #### ynh_return -
Return data to the YunoHost core for later processing -(to be used by special hooks like app config panel and core diagnosis) +[details summary="Return data to the YunoHost core for later processing +(to be used by special hooks like app config panel and core diagnosis)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_return somedata` @@ -2044,8 +2044,8 @@ Requires YunoHost version 3.5.0 or higher. Requires YunoHost version 3.6.0 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/logging#L345) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/logging#L345) +[/details] --- @@ -2054,7 +2054,7 @@ Requires YunoHost version 3.6.0 or higher. #### ynh_multimedia_build_main_dir -
Initialize the multimedia directory system +[details summary="Initialize the multimedia directory system" class="helper-card-subtitle text-muted"] **Usage**: `ynh_multimedia_build_main_dir` @@ -2062,12 +2062,12 @@ Requires YunoHost version 3.6.0 or higher. Requires YunoHost version 4.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/multimedia#L11) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/multimedia#L11) +[/details] #### ynh_multimedia_addfolder -
Add a directory in yunohost.multimedia +[details summary="Add a directory in yunohost.multimedia" class="helper-card-subtitle text-muted"] **Usage**: `ynh_multimedia_addfolder --source_dir="source_dir" --dest_dir="dest_dir"` @@ -2081,12 +2081,12 @@ This "directory" will be a symbolic link to a existing directory. Requires YunoHost version 4.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/multimedia#L64) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/multimedia#L64) +[/details] #### ynh_multimedia_addaccess -
Allow an user to have an write authorisation in multimedia directories +[details summary="Allow an user to have an write authorisation in multimedia directories" class="helper-card-subtitle text-muted"] **Usage**: `ynh_multimedia_addaccess user_name` @@ -2097,8 +2097,8 @@ Requires YunoHost version 4.2 or higher. Requires YunoHost version 4.2 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/multimedia#L93) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/multimedia#L93) +[/details] --- @@ -2111,9 +2111,157 @@ Requires YunoHost version 4.2 or higher. ### PERMISSION +#### ynh_permission_create + +[details summary="Create a new permission for the app" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_permission_create --permission="permission" [--url="url"] [--additional_urls="second-url" [ "third-url" ]] [--auth_header=true|false] + [--allowed=group1 [ group2 ]] [--label="label"] [--show_tile=true|false] + [--protected=true|false]` + +**Arguments**: +- `-p`, `--permission=`: the name for the permission (by default a permission named "main" already exist) +- `-u`, `--url=`: (optional) URL for which access will be allowed/forbidden. Note that if 'show_tile' is enabled, this URL will be the URL of the tile. +- `-A`, `--additional_urls=`: (optional) List of additional URL for which access will be allowed/forbidden +- `-h`, `--auth_header=`: (optional) Define for the URL of this permission, if SSOwat pass the authentication header to the application. Default is true +- `-a`, `--allowed=`: (optional) A list of group/user to allow for the permission +- `-l`, `--label=`: (optional) Define a name for the permission. This label will be shown on the SSO and in the admin. Default is "APP_LABEL (permission name)". +- `-t`, `--show_tile=`: (optional) Define if a tile will be shown in the SSO. If yes the name of the tile will be the 'label' parameter. Defaults to false for the permission different than 'main'. +- `-P`, `--protected=`: (optional) Define if this permission is protected. If it is protected the administrator won't be able to add or remove the visitors group of this permission. Defaults to 'false'. + +**Details**: +Example 1: `ynh_permission_create --permission=admin --url=/admin --additional_urls=domain.tld/admin /superadmin --allowed=alice bob \ + --label="My app admin" --show_tile=true` + +This example will create a new permission permission with this following effect: +- A tile named "My app admin" in the SSO will be available for the users alice and bob. This tile will point to the relative url '/admin'. +- Only the user alice and bob will have the access to theses following url: /admin, domain.tld/admin, /superadmin + +Example 2: + +ynh_permission_create --permission=api --url=domain.tld/api --auth_header=false --allowed=visitors \ + --label="MyApp API" --protected=true + +This example will create a new protected permission. So the admin won't be able to add/remove the visitors group of this permission. +In case of an API with need to be always public it avoid that the admin break anything. +With this permission all client will be allowed to access to the url 'domain.tld/api'. +Note that in this case no tile will be show on the SSO. +Note that the auth_header parameter is to 'false'. So no authentication header will be passed to the application. +Generally the API is requested by an application and enabling the auth_header has no advantage and could bring some issues in some case. +So in this case it's better to disable this option for all API. + +If provided, 'url' or 'additional_urls' is assumed to be relative to the app domain/path if they +start with '/'. For example: + / -> domain.tld/app + /admin -> domain.tld/app/admin + domain.tld/app/api -> domain.tld/app/api + +'url' or 'additional_urls' can be treated as a PCRE (not lua) regex if it starts with "re:". +For example: + re:/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$ + re:domain.tld/app/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$ + +Note that globally the parameter 'url' and 'additional_urls' are same. The only difference is: +- 'url' is only one url, 'additional_urls' can be a list of urls. There are no limitation of 'additional_urls' +- 'url' is used for the url of tile in the SSO (if enabled with the 'show_tile' parameter) + +About the authentication header (auth_header parameter). +The SSO pass (by default) to the application theses following HTTP header (linked to the authenticated user) to the application: + - "Auth-User": username + - "Remote-User": username + - "Email": user email + +Generally this feature is usefull to authenticate automatically the user in the application but in some case the application don't work with theses header and theses header need to be disabled to have the application to work correctly. +See https://github.com/YunoHost/issues/issues/1420 for more informations + +Requires YunoHost version 3.7.0 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/permission#L66) +[/details] + +#### ynh_permission_delete + +[details summary="Remove a permission for the app (note that when the app is removed all permission is automatically removed)" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_permission_delete --permission="permission"` + +**Arguments**: +- `-p`, `--permission=`: the name for the permission (by default a permission named "main" is removed automatically when the app is removed) + +**Example**: `ynh_permission_delete --permission=editors` + +**Details**: +Requires YunoHost version 3.7.0 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/permission#L152) +[/details] + +#### ynh_permission_exists + +[details summary="Check if a permission exists" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_permission_exists --permission=permission +| exit: Return 1 if the permission doesn't exist, 0 otherwise` + +**Arguments**: +- `-p`, `--permission=`: the permission to check + +**Details**: +Requires YunoHost version 3.7.0 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/permission#L169) +[/details] + +#### ynh_permission_url + +[details summary="Redefine the url associated to a permission" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_permission_url --permission "permission" [--url="url"] [--add_url="new-url" [ "other-new-url" ]] [--remove_url="old-url" [ "other-old-url" ]] + [--auth_header=true|false] [--clear_urls]` + +**Arguments**: +- `-p`, `--permission=`: the name for the permission (by default a permission named "main" is removed automatically when the app is removed) +- `-u`, `--url=`: (optional) URL for which access will be allowed/forbidden. Note that if you want to remove url you can pass an empty sting as arguments (""). +- `-a`, `--add_url=`: (optional) List of additional url to add for which access will be allowed/forbidden. +- `-r`, `--remove_url=`: (optional) List of additional url to remove for which access will be allowed/forbidden +- `-h`, `--auth_header=`: (optional) Define for the URL of this permission, if SSOwat pass the authentication header to the application +- `-c`, `--clear_urls`: (optional) Clean all urls (url and additional_urls) + +**Details**: +Requires YunoHost version 3.7.0 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/permission#L192) +[/details] + +#### ynh_permission_update + +[details summary="Update a permission for the app" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_permission_update --permission "permission" [--add="group" ["group" ...]] [--remove="group" ["group" ...]] + [--label="label"] [--show_tile=true|false] [--protected=true|false]` + +**Arguments**: +- `-p`, `--permission=`: the name for the permission (by default a permission named "main" already exist) +- `-a`, `--add=`: the list of group or users to enable add to the permission +- `-r`, `--remove=`: the list of group or users to remove from the permission +- `-l`, `--label=`: (optional) Define a name for the permission. This label will be shown on the SSO and in the admin. +- `-t`, `--show_tile=`: (optional) Define if a tile will be shown in the SSO +- `-P`, `--protected=`: (optional) Define if this permission is protected. If it is protected the administrator won't be able to add or remove the visitors group of this permission. + +**Details**: +Requires YunoHost version 3.7.0 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/permission#L260) +[/details] + #### ynh_permission_has_user -
Check if a permission has an user +[details summary="Check if a permission has an user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_permission_has_user --permission=permission --user=user | exit: Return 1 if the permission doesn't have that user or doesn't exist, 0 otherwise` @@ -2128,8 +2276,32 @@ Requires YunoHost version 4.2 or higher. Requires YunoHost version 3.7.1 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/permission#L339) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/permission#L329) +[/details] + +#### ynh_legacy_permissions_exists + +[details summary="Check if a legacy permissions exist" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_legacy_permissions_exists +| exit: Return 1 if the permission doesn't exist, 0 otherwise` + +**Details**: +Requires YunoHost version 4.1.2 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/permission#L359) +[/details] + +#### ynh_legacy_permissions_delete_all + +[details summary="Remove all legacy permissions" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_legacy_permissions_delete_all` + +**Example**: `if ynh_legacy_permissions_exists then ynh_legacy_permissions_delete_all # You can recreate the required permissions here with ynh_permission_create fi Requires YunoHost version 4.1.2 or higher.` +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/permission#L379) +[/details] --- @@ -2138,7 +2310,7 @@ Requires YunoHost version 3.7.1 or higher. #### ynh_package_is_installed -
Check either a package is installed or not +[details summary="Check either a package is installed or not" class="helper-card-subtitle text-muted"] **Usage**: `ynh_package_is_installed --package=name` @@ -2153,17 +2325,116 @@ Requires YunoHost version 3.7.1 or higher. Requires YunoHost version 2.2.4 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/apt#L53) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/apt#L53) +[/details] + +#### ynh_install_app_dependencies + +[details summary="Define and install dependencies with a equivs control file" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_install_app_dependencies dep [dep [...]]` + +**Arguments**: +- `dep`: the package name to install in dependence. +- `"dep1|dep2|…"`: You can specify alternatives. It will require to install (dep1 or dep2, etc). + +**Details**: +This helper can/should only be called once per app + +example : ynh_install_app_dependencies dep1 dep2 "dep3|dep4|dep5" + +Requires YunoHost version 2.6.4 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/apt#L236) +[/details] + +#### ynh_remove_app_dependencies + +[details summary="Remove fake package and its dependencies" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_remove_app_dependencies` + +**Details**: +Dependencies will removed only if no other package need them. + +Requires YunoHost version 2.6.4 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/apt#L370) +[/details] + +#### ynh_install_extra_app_dependencies + +[details summary="Install packages from an extra repository properly." class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_install_extra_app_dependencies --repo="repo" --package="dep1 dep2" [--key=key_url] [--name=name]` + +**Arguments**: +- `-r`, `--repo=`: Complete url of the extra repository. +- `-p`, `--package=`: The packages to install from this extra repository +- `-k`, `--key=`: url to get the public key. +- `-n`, `--name=`: Name for the files for this repo, $app as default value. + +**Details**: +Requires YunoHost version 3.8.1 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/apt#L404) +[/details] --- ### SYSTEMUSER +#### ynh_system_user_create + +[details summary="Create a system user" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_system_user_create --username=user_name [--home_dir=home_dir] [--use_shell] [--groups="group1 group2"]` + +**Arguments**: +- `-u`, `--username=`: Name of the system user that will be create +- `-h`, `--home_dir=`: Path of the home dir for the user. Usually the final path of the app. If this argument is omitted, the user will be created without home +- `-s`, `--use_shell`: Create a user using the default login shell if present. If this argument is omitted, the user will be created with /usr/sbin/nologin shell +- `-g`, `--groups`: Add the user to system groups. Typically meant to add the user to the ssh.app / sftp.app group (e.g. for borgserver, my_webapp) + +**Details**: +Create a nextcloud user with no home directory and /usr/sbin/nologin login shell (hence no login capability) : +``` +ynh_system_user_create --username=nextcloud +``` +Create a discourse user using /var/www/discourse as home directory and the default login shell : +``` +ynh_system_user_create --username=discourse --home_dir=/var/www/discourse --use_shell +``` + +Requires YunoHost version 2.6.4 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/systemuser#L61) +[/details] + +#### ynh_system_user_delete + +[details summary="Delete a system user" class="helper-card-subtitle text-muted"] + +**Usage**: `ynh_system_user_delete --username=user_name` + +**Arguments**: +- `-u`, `--username=`: Name of the system user that will be create + +**Details**: +Requires YunoHost version 2.6.4 or higher. + + +[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/systemuser#L103) +[/details] + #### ynh_exec_as -
Execute a command as another user +[details summary="Execute a command as another user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_exec_as $USER COMMAND [ARG ...]` @@ -2171,8 +2442,8 @@ Requires YunoHost version 2.2.4 or higher. Requires YunoHost version 4.1.7 or higher. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v1.d/systemuser#L133) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v1.d/systemuser#L129) +[/details] --- diff --git a/pages/06.contribute/10.packaging_apps/20.scripts/12.helpers21/packaging_app_scripts_helpers_v21.md b/pages/06.contribute/10.packaging_apps/20.scripts/12.helpers21/packaging_app_scripts_helpers_v21.md index 60f722d9..32cffa43 100644 --- a/pages/06.contribute/10.packaging_apps/20.scripts/12.helpers21/packaging_app_scripts_helpers_v21.md +++ b/pages/06.contribute/10.packaging_apps/20.scripts/12.helpers21/packaging_app_scripts_helpers_v21.md @@ -7,7 +7,7 @@ routes: default: '/packaging_apps_helpers_v2.1' --- -Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/doc/generate_helper_doc.py) on 24/06/2024 (YunoHost version 11.2.17) +Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/doc/generate_helper_doc.py) on 25/06/2024 (YunoHost version 11.2.17.1) @@ -21,7 +21,7 @@ Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/2d #### ynh_setup_source -
Download, check integrity, uncompress and patch upstream sources +[details summary="Download, check integrity, uncompress and patch upstream sources" class="helper-card-subtitle text-muted"] **Usage**: `ynh_setup_source --dest_dir=dest_dir [--source_id=source_id] [--keep="file1 file2"] [--full_replace]` @@ -87,8 +87,8 @@ The helper will: - Patches named `patches/${src_id}-*.patch` will be applied to `$dest_dir` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/sources#L64) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/sources#L64) +[/details] --- @@ -103,7 +103,7 @@ The helper will: #### ynh_nodejs_install -
Install a specific version of nodejs, using 'n' +[details summary="Install a specific version of nodejs, using 'n'" class="helper-card-subtitle text-muted"] **Usage**: `ynh_nodejs_install` @@ -119,12 +119,12 @@ is preserved when calling ynh_exec_as_app). Also defines: - `$nodejs_dir`, the directory containing the specific version of nodejs, which may be used in the systemd config too (e.g. `ExecStart=__NODEJS_DIR__/node foo bar`) -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/nodejs#L42) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/nodejs#L42) +[/details] #### ynh_nodejs_remove -
Remove the version of node used by the app. +[details summary="Remove the version of node used by the app." class="helper-card-subtitle text-muted"] **Usage**: `ynh_nodejs_remove` @@ -134,8 +134,8 @@ This helper will check if another app uses the same version of node. - If no other app uses node, n will be also removed. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/nodejs#L107) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/nodejs#L107) +[/details] --- @@ -144,7 +144,7 @@ This helper will check if another app uses the same version of node. #### ynh_ruby_install -
Install a specific version of Ruby using rbenv +[details summary="Install a specific version of Ruby using rbenv" class="helper-card-subtitle text-muted"] **Usage**: `ynh_ruby_install` @@ -159,12 +159,12 @@ is preserved when calling ynh_exec_as_app). Also defines: This helper also creates a /etc/profile.d/rbenv.sh that configures PATH environment for rbenv -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/ruby#L44) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/ruby#L44) +[/details] #### ynh_ruby_remove -
Remove the version of Ruby used by the app. +[details summary="Remove the version of Ruby used by the app." class="helper-card-subtitle text-muted"] **Usage**: `ynh_ruby_remove` @@ -172,8 +172,8 @@ This helper also creates a /etc/profile.d/rbenv.sh that configures PATH environm This helper will also cleanup unused Ruby versions -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/ruby#L185) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/ruby#L185) +[/details] --- @@ -182,7 +182,7 @@ This helper will also cleanup unused Ruby versions #### ynh_go_install -
Install a specific version of Go using goenv +[details summary="Install a specific version of Go using goenv" class="helper-card-subtitle text-muted"] **Usage**: `ynh_go_install` @@ -197,12 +197,12 @@ is preserved when calling `ynh_exec_as_app`). Also defines: This helper also creates a /etc/profile.d/goenv.sh that configures PATH environment for goenv -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/go#L42) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/go#L42) +[/details] #### ynh_go_remove -
Remove the version of Go used by the app. +[details summary="Remove the version of Go used by the app." class="helper-card-subtitle text-muted"] **Usage**: `ynh_go_remove` @@ -210,8 +210,8 @@ This helper also creates a /etc/profile.d/goenv.sh that configures PATH environm This helper will also cleanup Go versions -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/go#L129) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/go#L129) +[/details] --- @@ -220,7 +220,7 @@ This helper will also cleanup Go versions #### ynh_composer_install -
Install and initialize Composer in the given directory +[details summary="Install and initialize Composer in the given directory" class="helper-card-subtitle text-muted"] **Usage**: `ynh_composer_install` @@ -231,12 +231,12 @@ as global prior to calling this helper. Will use `$install_dir` as workdir unless `$composer_workdir` exists (but that shouldnt be necessary) -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/composer#L11) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/composer#L11) +[/details] #### ynh_composer_exec -
Execute a command with Composer +[details summary="Execute a command with Composer" class="helper-card-subtitle text-muted"] **Usage**: `ynh_composer_exec commands` @@ -247,8 +247,8 @@ You may also define `composer_user=root` prior to call this helper if you absolutely need composer to run as root, but this is discouraged... -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/composer#L37) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/composer#L37) +[/details] --- @@ -263,7 +263,7 @@ absolutely need composer to run as root, but this is discouraged... #### ynh_mysql_db_shell -
Run SQL instructions in a database ($db_name by default) +[details summary="Run SQL instructions in a database ($db_name by default)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mysql_db_shell [database] <<< "instructions"` @@ -280,12 +280,12 @@ absolutely need composer to run as root, but this is discouraged... - ` ynh_mysql_db_shell < /path/to/file.sql` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/mysql#L12) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/mysql#L12) +[/details] #### ynh_mysql_dump_db -
Dump a database +[details summary="Dump a database" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mysql_dump_db database` @@ -295,8 +295,8 @@ absolutely need composer to run as root, but this is discouraged... **Returns**: The mysqldump output **Example**: `ynh_mysql_dump_db "roundcube" > ./dump.sql` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/mysql#L65) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/mysql#L65) +[/details] --- @@ -305,7 +305,7 @@ absolutely need composer to run as root, but this is discouraged... #### ynh_psql_db_shell -
Run SQL instructions in a database ($db_name by default) +[details summary="Run SQL instructions in a database ($db_name by default)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_psql_db_shell database <<< "instructions"` @@ -322,12 +322,12 @@ absolutely need composer to run as root, but this is discouraged... - ` ynh_psql_db_shell < /path/to/file.sql` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/postgresql#L15) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/postgresql#L15) +[/details] #### ynh_psql_dump_db -
Dump a database +[details summary="Dump a database" class="helper-card-subtitle text-muted"] **Usage**: `ynh_psql_dump_db database` @@ -337,8 +337,8 @@ absolutely need composer to run as root, but this is discouraged... **Returns**: the psqldump output **Example**: `ynh_psql_dump_db 'roundcube' > ./dump.sql` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/postgresql#L70) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/postgresql#L70) +[/details] --- @@ -347,7 +347,7 @@ absolutely need composer to run as root, but this is discouraged... #### ynh_mongo_exec -
Execute a mongo command +[details summary="Execute a mongo command" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_exec [--database=database] --command="command"` @@ -361,12 +361,12 @@ absolutely need composer to run as root, but this is discouraged... -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/mongodb#L13) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/mongodb#L13) +[/details] #### ynh_mongo_dump_db -
Dump a database +[details summary="Dump a database" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_dump_db --database=database` @@ -381,12 +381,12 @@ absolutely need composer to run as root, but this is discouraged... -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/mongodb#L64) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/mongodb#L64) +[/details] #### ynh_mongo_database_exists -
Check if a mongo database exists +[details summary="Check if a mongo database exists" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_database_exists --database=database | exit: Return 1 if the database doesn't exist, 0 otherwise` @@ -398,12 +398,12 @@ absolutely need composer to run as root, but this is discouraged... -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/mongodb#L107) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/mongodb#L107) +[/details] #### ynh_mongo_restore_db -
Restore a database +[details summary="Restore a database" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_restore_db --database=database` @@ -416,12 +416,12 @@ absolutely need composer to run as root, but this is discouraged... -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/mongodb#L130) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/mongodb#L130) +[/details] #### ynh_mongo_setup_db -
Create a database, an user and its password. Then store the password in the app's config +[details summary="Create a database, an user and its password. Then store the password in the app's config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_setup_db --db_user=user --db_name=name [--db_pwd=pwd]` @@ -437,12 +437,12 @@ It will also be stored as "mongopwd" into the app settings. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/mongodb#L171) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/mongodb#L171) +[/details] #### ynh_mongo_remove_db -
Remove a database if it exists, and the associated user +[details summary="Remove a database if it exists, and the associated user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_mongo_remove_db --db_user=user --db_name=name` @@ -454,12 +454,12 @@ It will also be stored as "mongopwd" into the app settings. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/mongodb#L198) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/mongodb#L198) +[/details] #### ynh_install_mongo -
Install MongoDB and integrate MongoDB service in YunoHost +[details summary="Install MongoDB and integrate MongoDB service in YunoHost" class="helper-card-subtitle text-muted"] **Usage**: `ynh_install_mongo` @@ -467,14 +467,14 @@ It will also be stored as "mongopwd" into the app settings. The installed version is defined by $mongo_version which should be defined as global prior to calling this helper -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/mongodb#L222) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/mongodb#L222) +[/details] #### ynh_remove_mongo -
Remove MongoDB +[details summary="Remove MongoDB Only remove the MongoDB service integration in YunoHost for now -if MongoDB package as been removed +if MongoDB package as been removed" class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_mongo` @@ -482,8 +482,8 @@ if MongoDB package as been removed -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/mongodb#L260) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/mongodb#L260) +[/details] --- @@ -492,25 +492,25 @@ if MongoDB package as been removed #### ynh_redis_get_free_db -
get the first available redis database +[details summary="get the first available redis database" class="helper-card-subtitle text-muted"] **Usage**: `ynh_redis_get_free_db` **Returns**: the database number to use -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/redis#L7) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/redis#L7) +[/details] #### ynh_redis_remove_db -
Create a master password and set up global settings -Please always call this script in install and restore scripts +[details summary="Create a master password and set up global settings +Please always call this script in install and restore scripts" class="helper-card-subtitle text-muted"] **Usage**: `ynh_redis_remove_db database` **Arguments**: - `database`: the database to erase -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/redis#L36) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/redis#L36) +[/details] --- @@ -525,7 +525,7 @@ Please always call this script in install and restore scripts #### ynh_config_add -
Create a dedicated config file from a template +[details summary="Create a dedicated config file from a template" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_add --template="template" --destination="destination"` @@ -578,12 +578,12 @@ And it will calculate and store the destination file checksum into the app settings when configuration is done. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/templating#L44) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/templating#L44) +[/details] #### ynh_read_var_in_file -
Get a value from heterogeneous file (yaml, json, php, python...) +[details summary="Get a value from heterogeneous file (yaml, json, php, python...)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_read_var_in_file --file=PATH --key=KEY` @@ -620,12 +620,12 @@ Example of line this helpers can managed correctly CUSTOM['user'] = 'YunoHost' -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/templating#L172) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/templating#L172) +[/details] #### ynh_write_var_in_file -
Set a value into heterogeneous file (yaml, json, php, python...) +[details summary="Set a value into heterogeneous file (yaml, json, php, python...)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_write_var_in_file --file=PATH --key=KEY --value=VALUE` @@ -634,8 +634,8 @@ Example of line this helpers can managed correctly - `--key=`: the key to set - `--value=`: the value to set - `--after=`: the line just before the key (in case of multiple lines with the name of the key in the file) -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/templating#L247) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/templating#L247) +[/details] --- @@ -644,7 +644,7 @@ Example of line this helpers can managed correctly #### ynh_config_add_nginx -
Create a dedicated nginx config +[details summary="Create a dedicated nginx config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_add_nginx` @@ -661,24 +661,24 @@ This allows to enable/disable specific behaviors dependenging on the install location -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/nginx#L17) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/nginx#L17) +[/details] #### ynh_config_remove_nginx -
Remove the dedicated nginx config +[details summary="Remove the dedicated nginx config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_remove_nginx` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/nginx#L37) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/nginx#L37) +[/details] #### ynh_config_change_url_nginx -
Regen the nginx config in a change url context +[details summary="Regen the nginx config in a change url context" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_change_url_nginx` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/nginx#L46) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/nginx#L46) +[/details] --- @@ -687,7 +687,7 @@ location #### ynh_config_add_phpfpm -
Create a dedicated PHP-FPM config +[details summary="Create a dedicated PHP-FPM config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_add_phpfpm` @@ -733,16 +733,16 @@ Check PHP-FPM's manual for more info on what these are (: ... - `$php_max_spare_servers` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/php#L62) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/php#L62) +[/details] #### ynh_config_remove_phpfpm -
Remove the dedicated PHP-FPM config +[details summary="Remove the dedicated PHP-FPM config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_remove_phpfpm` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/php#L138) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/php#L138) +[/details] --- @@ -751,7 +751,7 @@ Check PHP-FPM's manual for more info on what these are (: ... #### ynh_config_add_systemd -
Create a dedicated systemd config +[details summary="Create a dedicated systemd config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_add_systemd [--service=service] [--template=template]` @@ -766,23 +766,23 @@ See the documentation of `ynh_config_add` for a description of the template format and how placeholders are replaced with actual variables. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/systemd#L13) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/systemd#L13) +[/details] #### ynh_config_remove_systemd -
Remove the dedicated systemd config +[details summary="Remove the dedicated systemd config" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_remove_systemd service` **Arguments**: - `service`: Service name (optionnal, $app by default) -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/systemd#L33) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/systemd#L33) +[/details] #### ynh_systemctl -
Start (or other actions) a service, print a log in case of failure and optionnaly wait until the service is completely started +[details summary="Start (or other actions) a service, print a log in case of failure and optionnaly wait until the service is completely started" class="helper-card-subtitle text-muted"] **Usage**: `ynh_systemctl [--service=service] [--action=action] [ [--wait_until="line to match"] [--log_path=log_path] [--timeout=300] [--length=20] ]` @@ -793,8 +793,8 @@ format and how placeholders are replaced with actual variables. - `--log_path=`: Log file - Path to the log file. Default : `/var/log/$app/$app.log` - `--timeout=`: Timeout - The maximum time to wait before ending the watching. Default : 60 seconds. - `--length=`: Length of the error log displayed for debugging : Default : 20 -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/systemd#L52) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/systemd#L52) +[/details] --- @@ -803,7 +803,7 @@ format and how placeholders are replaced with actual variables. #### ynh_config_add_fail2ban -
Create a dedicated fail2ban config (jail and filter conf files) +[details summary="Create a dedicated fail2ban config (jail and filter conf files)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_add_fail2ban --logpath=log_file --failregex=filter` @@ -857,16 +857,16 @@ fail2ban-regex /var/log/YOUR_LOG_FILE_PATH /etc/fail2ban/filter.d/YOUR_APP.conf ``` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/fail2ban#L52) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/fail2ban#L52) +[/details] #### ynh_config_remove_fail2ban -
Remove the dedicated fail2ban config (jail and filter conf files) +[details summary="Remove the dedicated fail2ban config (jail and filter conf files)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_remove_fail2ban` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/fail2ban#L114) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/fail2ban#L114) +[/details] --- @@ -875,7 +875,7 @@ fail2ban-regex /var/log/YOUR_LOG_FILE_PATH /etc/fail2ban/filter.d/YOUR_APP.conf #### ynh_config_add_logrotate -
Add a logrotate configuration to manage log files / log directory +[details summary="Add a logrotate configuration to manage log files / log directory" class="helper-card-subtitle text-muted"] **Usage**: `ynh_config_add_logrotate [/path/to/log/file/or/folder]` @@ -886,16 +886,16 @@ The configuration is autogenerated by YunoHost (ie it doesnt come from a specific app template like nginx or systemd conf) -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/logrotate#L13) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/logrotate#L13) +[/details] #### ynh_config_remove_logrotate -
Remove the app's logrotate config. +[details summary="Remove the app's logrotate config." class="helper-card-subtitle text-muted"] **Usage**: `ynh_remove_logrotate` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/logrotate#L69) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/logrotate#L69) +[/details] --- @@ -910,7 +910,7 @@ The configuration is autogenerated by YunoHost #### ynh_exec_as_app -
Execute a command after sudoing as $app +[details summary="Execute a command after sudoing as $app" class="helper-card-subtitle text-muted"] **Usage**: `ynh_exec_as_app COMMAND [ARG ...]` @@ -918,12 +918,12 @@ The configuration is autogenerated by YunoHost Note that the $PATH variable is preserved (using --preserve-env=PATH) -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L76) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L76) +[/details] #### ynh_local_curl -
Curl abstraction to help with POST requests to local pages (such as installation forms) +[details summary="Curl abstraction to help with POST requests to local pages (such as installation forms)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_local_curl "page_uri" "key1=value1" "key2=value2" ...` @@ -941,20 +941,20 @@ For multiple calls, cookies are persisted between each call for the same app `$domain` and `$path` should be defined externally (and correspond to the domain.tld and the /path (of the app?)) -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L93) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L93) +[/details] #### ynh_safe_rm -
Remove a file or a directory, checking beforehand that it's not a disastrous location to rm such as entire /var or /home +[details summary="Remove a file or a directory, checking beforehand that it's not a disastrous location to rm such as entire /var or /home" class="helper-card-subtitle text-muted"] **Usage**: `ynh_safe_rm path_to_remove` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L161) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L161) +[/details] #### ynh_read_manifest -
Read the value of a key in the app's manifest +[details summary="Read the value of a key in the app's manifest" class="helper-card-subtitle text-muted"] **Usage**: `ynh_read_manifest "key"` @@ -962,12 +962,12 @@ For multiple calls, cookies are persisted between each call for the same app - `key`: Name of the key to find **Returns**: the value associate to that key -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L187) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L187) +[/details] #### ynh_app_upstream_version -
Return the app upstream version, deduced from `$YNH_APP_MANIFEST_VERSION` and strippig the `~ynhX` part +[details summary="Return the app upstream version, deduced from `$YNH_APP_MANIFEST_VERSION` and strippig the `~ynhX` part" class="helper-card-subtitle text-muted"] **Usage**: `ynh_app_upstream_version` @@ -977,52 +977,52 @@ For multiple calls, cookies are persisted between each call for the same app For example, if the manifest contains `4.3-2~ynh3` the function will return `4.3-2` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L197) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L197) +[/details] #### ynh_app_upstream_version_changed -
Return 0 if the "upstream" part of the version changed, or 1 otherwise (ie only the ~ynh suffix changed) +[details summary="Return 0 if the "upstream" part of the version changed, or 1 otherwise (ie only the ~ynh suffix changed)" class="helper-card-subtitle text-muted"] **Usage**: `if ynh_app_upstream_version_changed; then ...` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L204) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L204) +[/details] #### ynh_app_upgrading_from_version_before -
Compare the current package version is strictly lower than another version given as an argument +[details summary="Compare the current package version is strictly lower than another version given as an argument" class="helper-card-subtitle text-muted"] **Usage**: `` **Example**: `if ynh_app_upgrading_from_version_before 2.3.2~ynh1; then ...` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L212) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L212) +[/details] #### ynh_app_upgrading_from_version_before_or_equal_to -
Compare the current package version is lower or equal to another version given as an argument +[details summary="Compare the current package version is lower or equal to another version given as an argument" class="helper-card-subtitle text-muted"] **Usage**: `` **Example**: `if ynh_app_upgrading_from_version_before_or_equal_to 2.3.2~ynh1; then ...` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L222) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L222) +[/details] #### ynh_validate_ip -
Validate an IP address +[details summary="Validate an IP address" class="helper-card-subtitle text-muted"] **Usage**: `ynh_validate_ip --family=family --ip_address=ip_address` **Returns**: 0 for valid ip addresses, 1 otherwise **Example**: `ynh_validate_ip 4 111.222.333.444` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L280) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L280) +[/details] #### ynh_in_ci_tests -
Check if the scripts are being run by the package_check in CI +[details summary="Check if the scripts are being run by the package_check in CI" class="helper-card-subtitle text-muted"] **Usage**: `ynh_in_ci_tests` @@ -1030,12 +1030,12 @@ For example, if the manifest contains `4.3-2~ynh3` the function will return `4.3 Return 0 if in CI, 1 otherwise -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L344) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L344) +[/details] #### ynh_user_get_info -
Retrieve a YunoHost user information +[details summary="Retrieve a YunoHost user information" class="helper-card-subtitle text-muted"] **Usage**: `ynh_user_get_info --username=username --key=key` @@ -1046,20 +1046,20 @@ Return 0 if in CI, 1 otherwise **Returns**: the value associate to that key **Example**: `mail=$(ynh_user_get_info --username="toto" --key=mail)` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L356) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L356) +[/details] #### ynh_user_list -
Get the list of YunoHost users +[details summary="Get the list of YunoHost users" class="helper-card-subtitle text-muted"] **Usage**: `ynh_user_list` **Returns**: one username per line as strings **Example**: `for u in $(ynh_user_list); do ... ; done` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/utils#L373) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/utils#L373) +[/details] --- @@ -1068,19 +1068,19 @@ Return 0 if in CI, 1 otherwise #### ynh_app_setting_get -
Get an application setting +[details summary="Get an application setting" class="helper-card-subtitle text-muted"] **Usage**: `ynh_app_setting_get --key=key` **Arguments**: - `--app=`: the application id (global $app by default) - `--key=`: the setting to get -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/setting#L8) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/setting#L8) +[/details] #### ynh_app_setting_set -
Set an application setting +[details summary="Set an application setting" class="helper-card-subtitle text-muted"] **Usage**: `ynh_app_setting_set --key=key --value=value` @@ -1088,12 +1088,12 @@ Return 0 if in CI, 1 otherwise - `--app=`: the application id (global $app by default) - `--key=`: the setting name to set - `--value=`: the setting value to set -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/setting#L27) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/setting#L27) +[/details] #### ynh_app_setting_set_default -
Set an application setting but only if the "$key" variable ain't set yet +[details summary="Set an application setting but only if the "$key" variable ain't set yet" class="helper-card-subtitle text-muted"] **Usage**: `ynh_app_setting_set_default --key=key --value=value` @@ -1114,20 +1114,20 @@ then fi -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/setting#L57) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/setting#L57) +[/details] #### ynh_app_setting_delete -
Delete an application setting +[details summary="Delete an application setting" class="helper-card-subtitle text-muted"] **Usage**: `ynh_app_setting_delete --key=key` **Arguments**: - `--app=`: the application id (global $app by default) - `--key=`: the setting to delete -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/setting#L79) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/setting#L79) +[/details] --- @@ -1136,7 +1136,7 @@ fi #### ynh_string_random -
Generate a random string +[details summary="Generate a random string" class="helper-card-subtitle text-muted"] **Usage**: `ynh_string_random [--length=string_length]` @@ -1147,12 +1147,12 @@ fi **Returns**: the generated string **Example**: `pwd=$(ynh_string_random --length=8)` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/string#L11) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/string#L11) +[/details] #### ynh_replace -
Substitute/replace a string (or expression) by another in a file +[details summary="Substitute/replace a string (or expression) by another in a file" class="helper-card-subtitle text-muted"] **Usage**: `ynh_replace --match=match --replace=replace --file=file` @@ -1166,12 +1166,12 @@ As this helper is based on sed command, regular expressions and references to sub-expressions can be used (see sed manual page for more information) -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/string#L35) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/string#L35) +[/details] #### ynh_replace_regex -
Substitute/replace a regex in a file +[details summary="Substitute/replace a regex in a file" class="helper-card-subtitle text-muted"] **Usage**: `ynh_replace_regex --match=match --replace=replace --file=file` @@ -1185,12 +1185,12 @@ This helper will use ynh_replace, but as you can use special characters, you can't use some regular expressions and sub-expressions. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/string#L63) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/string#L63) +[/details] #### ynh_normalize_url_path -
Normalize the url path syntax +[details summary="Normalize the url path syntax" class="helper-card-subtitle text-muted"] **Usage**: `ynh_normalize_url_path path_to_normalize` @@ -1222,8 +1222,8 @@ Handle the slash at the beginning of path and its absence at ending Return a normalized url path -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/string#L118) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/string#L118) +[/details] --- @@ -1232,7 +1232,7 @@ Return a normalized url path #### ynh_backup -
Add a file or a directory to the list of paths to backup +[details summary="Add a file or a directory to the list of paths to backup" class="helper-card-subtitle text-muted"] **Usage**: `ynh_backup /path/to/stuff` @@ -1253,12 +1253,12 @@ upgrade fails and the script is removed prior to restoring the backup, the data/logs are not destroyed. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/backup#L24) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/backup#L24) +[/details] #### ynh_restore -
Restore a file or a directory from the backup archive +[details summary="Restore a file or a directory from the backup archive" class="helper-card-subtitle text-muted"] **Usage**: `ynh_restore /path/to/stuff` @@ -1280,28 +1280,28 @@ otheriwse, search for a match in the csv (eg: conf/nginx.conf) and restore it in `/etc/nginx/conf.d/$domain.d/$app.conf` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/backup#L131) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/backup#L131) +[/details] #### ynh_restore_everything -
Restore all files that were previously backuped in an app backup script +[details summary="Restore all files that were previously backuped in an app backup script" class="helper-card-subtitle text-muted"] **Usage**: `ynh_restore_everything` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/backup#L187) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/backup#L187) +[/details] #### ynh_store_file_checksum -
Calculate and store a file checksum into the app settings +[details summary="Calculate and store a file checksum into the app settings" class="helper-card-subtitle text-muted"] **Usage**: `ynh_store_file_checksum /path/to/file` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/backup#L209) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/backup#L209) +[/details] #### ynh_backup_if_checksum_is_different -
Verify the checksum and backup the file if it's different +[details summary="Verify the checksum and backup the file if it's different" class="helper-card-subtitle text-muted"] **Usage**: `ynh_backup_if_checksum_is_different /path/to/file` @@ -1310,16 +1310,16 @@ This helper is primarily meant to allow to easily backup personalised/manually modified config files. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/backup#L240) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/backup#L240) +[/details] #### ynh_delete_file_checksum -
Delete a file checksum from the app settings +[details summary="Delete a file checksum from the app settings" class="helper-card-subtitle text-muted"] **Usage**: `ynh_delete_file_checksum /path/to/file` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/backup#L271) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/backup#L271) +[/details] --- @@ -1328,42 +1328,42 @@ modified config files. #### ynh_die -
Print a message to stderr and terminate the current script +[details summary="Print a message to stderr and terminate the current script" class="helper-card-subtitle text-muted"] **Usage**: `ynh_die "Some message"` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/logging#L6) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/logging#L6) +[/details] #### ynh_print_info -
Print an "INFO" message +[details summary="Print an "INFO" message" class="helper-card-subtitle text-muted"] **Usage**: `ynh_print_info "Some message"` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/logging#L14) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/logging#L14) +[/details] #### ynh_print_warn -
Print a warning on stderr +[details summary="Print a warning on stderr" class="helper-card-subtitle text-muted"] **Usage**: `ynh_print_warn "Some message"` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/logging#L21) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/logging#L21) +[/details] #### ynh_hide_warnings -
Execute a command and redirect stderr to stdout +[details summary="Execute a command and redirect stderr to stdout" class="helper-card-subtitle text-muted"] **Usage**: `ynh_hide_warnings your command and args` **Arguments**: - `command`: command to execute -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/logging#L30) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/logging#L30) +[/details] #### ynh_exec_and_print_stderr_only_if_error -
Execute a command and redirect stderr in /dev/null. Print stderr on error. +[details summary="Execute a command and redirect stderr in /dev/null. Print stderr on error." class="helper-card-subtitle text-muted"] **Usage**: `ynh_exec_and_print_stderr_only_if_error your command and args` @@ -1374,25 +1374,25 @@ modified config files. Note that you should NOT quote the command but only prefix it with ynh_exec_and_print_stderr_only_if_error -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/logging#L41) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/logging#L41) +[/details] #### ynh_return -
Return data to the YunoHost core for later processing -(to be used by special hooks like app config panel and core diagnosis) +[details summary="Return data to the YunoHost core for later processing +(to be used by special hooks like app config panel and core diagnosis)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_return somedata` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/logging#L57) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/logging#L57) +[/details] #### ynh_script_progression -
Print a progress bar showing the progression of an app script +[details summary="Print a progress bar showing the progression of an app script" class="helper-card-subtitle text-muted"] **Usage**: `ynh_script_progression "Some message"` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/logging#L75) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/logging#L75) +[/details] --- @@ -1401,15 +1401,15 @@ Note that you should NOT quote the command but only prefix it with ynh_exec_and_ #### ynh_multimedia_build_main_dir -
Initialize the multimedia directory system +[details summary="Initialize the multimedia directory system" class="helper-card-subtitle text-muted"] **Usage**: `ynh_multimedia_build_main_dir` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/multimedia#L9) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/multimedia#L9) +[/details] #### ynh_multimedia_addfolder -
Add a directory in yunohost.multimedia +[details summary="Add a directory in yunohost.multimedia" class="helper-card-subtitle text-muted"] **Usage**: `ynh_multimedia_addfolder --source_dir="source_dir" --dest_dir="dest_dir"` @@ -1421,19 +1421,19 @@ Note that you should NOT quote the command but only prefix it with ynh_exec_and_ This "directory" will be a symbolic link to a existing directory. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/multimedia#L60) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/multimedia#L60) +[/details] #### ynh_multimedia_addaccess -
Allow an user to have an write authorisation in multimedia directories +[details summary="Allow an user to have an write authorisation in multimedia directories" class="helper-card-subtitle text-muted"] **Usage**: `ynh_multimedia_addaccess user_name` **Arguments**: - `--user_name=`: The name of the user which gain this access. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/multimedia#L86) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/multimedia#L86) +[/details] --- @@ -1448,7 +1448,7 @@ This "directory" will be a symbolic link to a existing directory. #### ynh_permission_delete -
Remove a permission for the app (note that when the app is removed all permission is automatically removed) +[details summary="Remove a permission for the app (note that when the app is removed all permission is automatically removed)" class="helper-card-subtitle text-muted"] **Usage**: `ynh_permission_delete --permission="permission"` @@ -1456,24 +1456,24 @@ This "directory" will be a symbolic link to a existing directory. - `--permission=`: the name for the permission (by default a permission named "main" is removed automatically when the app is removed) **Example**: `ynh_permission_delete --permission=editors` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/permission#L149) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/permission#L149) +[/details] #### ynh_permission_exists -
Check if a permission exists +[details summary="Check if a permission exists" class="helper-card-subtitle text-muted"] **Usage**: `ynh_permission_exists --permission=permission | exit: Return 1 if the permission doesn't exist, 0 otherwise` **Arguments**: - `--permission=`: the permission to check -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/permission#L164) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/permission#L164) +[/details] #### ynh_permission_url -
Redefine the url associated to a permission +[details summary="Redefine the url associated to a permission" class="helper-card-subtitle text-muted"] **Usage**: `ynh_permission_url --permission "permission" [--url="url"] [--add_url="new-url" [ "other-new-url" ]] [--remove_url="old-url" [ "other-old-url" ]] [--auth_header=true|false] [--clear_urls]` @@ -1485,12 +1485,12 @@ This "directory" will be a symbolic link to a existing directory. - `--remove_url=`: (optional) List of additional url to remove for which access will be allowed/forbidden - `--auth_header=`: (optional) Define for the URL of this permission, if SSOwat pass the authentication header to the application - `--clear_urls`: (optional) Clean all urls (url and additional_urls) -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/permission#L185) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/permission#L185) +[/details] #### ynh_permission_update -
Update a permission for the app +[details summary="Update a permission for the app" class="helper-card-subtitle text-muted"] **Usage**: `ynh_permission_update --permission "permission" [--add="group" ["group" ...]] [--remove="group" ["group" ...]]` @@ -1498,12 +1498,12 @@ This "directory" will be a symbolic link to a existing directory. - `--permission=`: the name for the permission (by default a permission named "main" already exist) - `--add=`: the list of group or users to enable add to the permission - `--remove=`: the list of group or users to remove from the permission -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/permission#L248) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/permission#L248) +[/details] #### ynh_permission_has_user -
Check if a permission has an user +[details summary="Check if a permission has an user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_permission_has_user --permission=permission --user=user | exit: Return 1 if the permission doesn't have that user or doesn't exist, 0 otherwise` @@ -1513,8 +1513,8 @@ This "directory" will be a symbolic link to a existing directory. - `--user=`: the user seek in the permission **Example**: `ynh_permission_has_user --permission=main --user=visitors` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/permission#L289) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/permission#L289) +[/details] --- @@ -1523,7 +1523,7 @@ This "directory" will be a symbolic link to a existing directory. #### ynh_apt_install_dependencies -
Define and install dependencies with a equivs control file +[details summary="Define and install dependencies with a equivs control file" class="helper-card-subtitle text-muted"] **Usage**: `ynh_install_app_dependencies dep [dep [...]]` @@ -1535,12 +1535,12 @@ This "directory" will be a symbolic link to a existing directory. example : ynh_install_app_dependencies dep1 dep2 "dep3|dep4|dep5" -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/apt#L13) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/apt#L13) +[/details] #### ynh_apt_remove_dependencies -
Remove fake package and its dependencies +[details summary="Remove fake package and its dependencies" class="helper-card-subtitle text-muted"] **Usage**: `ynh_apt_remove_dependencies` @@ -1548,12 +1548,12 @@ example : ynh_install_app_dependencies dep1 dep2 "dep3|dep4|dep5" Dependencies will removed only if no other package need them. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/apt#L159) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/apt#L159) +[/details] #### ynh_apt_install_dependencies_from_extra_repository -
Install packages from an extra repository properly. +[details summary="Install packages from an extra repository properly." class="helper-card-subtitle text-muted"] **Usage**: `ynh_apt_install_dependencies_from_extra_repository --repo="repo" --package="dep1 dep2" --key=key_url` @@ -1561,8 +1561,8 @@ Dependencies will removed only if no other package need them. - `--repo=`: Complete url of the extra repository. - `--package=`: The packages to install from this extra repository - `--key=`: url to get the public key. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/apt#L191) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/apt#L191) +[/details] --- @@ -1571,7 +1571,7 @@ Dependencies will removed only if no other package need them. #### ynh_system_user_exists -
Check if a user exists on the system +[details summary="Check if a user exists on the system" class="helper-card-subtitle text-muted"] **Usage**: `ynh_system_user_exists --username=username` @@ -1579,12 +1579,12 @@ Dependencies will removed only if no other package need them. - `--username=`: the username to check **Returns**: 0 if the user exists, 1 otherwise. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/systemuser#L8) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/systemuser#L8) +[/details] #### ynh_system_group_exists -
Check if a group exists on the system +[details summary="Check if a group exists on the system" class="helper-card-subtitle text-muted"] **Usage**: `ynh_system_group_exists --group=group` @@ -1592,12 +1592,12 @@ Dependencies will removed only if no other package need them. - `--group=`: the group to check **Returns**: 0 if the group exists, 1 otherwise. -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/systemuser#L23) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/systemuser#L23) +[/details] #### ynh_system_user_create -
Create a system user +[details summary="Create a system user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_system_user_create --username=user_name [--home_dir=home_dir] [--use_shell] [--groups="group1 group2"]` @@ -1618,19 +1618,19 @@ ynh_system_user_create --username=discourse --home_dir=/var/www/discourse --use_ ``` -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/systemuser#L49) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/systemuser#L49) +[/details] #### ynh_system_user_delete -
Delete a system user +[details summary="Delete a system user" class="helper-card-subtitle text-muted"] **Usage**: `ynh_system_user_delete --username=user_name` **Arguments**: - `--username=`: Name of the system user that will be create -[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/2d2693507978b04c900c6aa90210cab996f317e7/helpers/helpers.v2.1.d/systemuser#L87) -
+[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/87eedc2a369baa72c9b8d46154924f667885c085/helpers/helpers.v2.1.d/systemuser#L87) +[/details] ---