From 1e5c7a036d2758e90ebe687cba6886ec902c0615 Mon Sep 17 00:00:00 2001 From: dragondaddy Date: Fri, 10 May 2024 00:57:42 +0200 Subject: [PATCH 1/4] Add an include in .htconfig.php for additional settings --- conf/htconfig.sample.php | 36 +++--------------------------------- manifest.toml | 2 +- scripts/backup | 2 +- scripts/install | 2 ++ scripts/upgrade | 5 +++++ 5 files changed, 12 insertions(+), 35 deletions(-) diff --git a/conf/htconfig.sample.php b/conf/htconfig.sample.php index bc4ef88..60a15a7 100644 --- a/conf/htconfig.sample.php +++ b/conf/htconfig.sample.php @@ -121,39 +121,6 @@ App::$config['system']['theme'] = 'fresh'; // Allow local test environments with unverified SSL certs using Lando App::$config['system']['ssl_exceptions'] = 'lndo.site'; -// Mail configuration -// By default, uses local sendmail service -// Only change these settings if you require SMTP transport - -// App::$config['phpmailer']['mailer'] = 'smtp'; -// App::$config['phpmailer']['host'] = 'example.com'; - -// Leave this line commented if using SSL or STARTTLS and set the port in the next sections -// App::$config['phpmailer']['port'] = 25; // (or 587 or 465 if using ssl) - -// If using smtp authentication: -// App::$config['phpmailer']['smtpauth'] = 1; -// App::$config['phpmailer']['uername'] = 'your_username'; -// App::$config['phpmailer']['password'] = 'your_secret_password'; - -// If using starttls: -// App::$config['phpmailer']['smtpsecure'] = 'tls'; -// App::$config['phpmailer']['port'] = 587; - -// If using ssl: -// App::$config['phpmailer']['smtpsecure'] = 'ssl'; -// App::$config['phpmailer']['port'] = 465; - -// If the server has a self-signed cert: -// App::$config['phpmailer']['noverify'] = 1; - -// For debugging -// App::$config['phpmailer']['smtpdebug'] = 2; // valid values are 0-4 - -// These settings should work for 99% of use cases -// If you encounter any issues, please see https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting -// If you need to extend these configuration options, please submit a pull request with your changes. - // PHP error logging setup // Before doing this ensure that the webserver has permission @@ -166,3 +133,6 @@ ini_set('display_errors', '0'); error_reporting(E_ERROR | E_PARSE ); ini_set('error_log','php.log'); ini_set('log_errors','1'); + +// Extra settings stored in the app data dir (Service Classes, PHPMailer...) +include __DATA_DIR__/extra_conf.php diff --git a/manifest.toml b/manifest.toml index e710bd5..92663b6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Streams" description.en = "Open source fediverse server" description.fr = "Serveur fediverse open source" -version = "24.02.18~ynh3" +version = "24.05.10~ynh1" maintainers = ["Papa Dragon"] diff --git a/scripts/backup b/scripts/backup index c06af88..b1c66e8 100644 --- a/scripts/backup +++ b/scripts/backup @@ -53,7 +53,7 @@ ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= ynh_backup --src_path="/etc/cron.d/$app" -ynh_backup --src_path="/$data_dir" +ynh_backup --src_path="$data_dir" #================================================= # BACKUP THE DATABASE diff --git a/scripts/install b/scripts/install index 78fd60c..6ad146d 100755 --- a/scripts/install +++ b/scripts/install @@ -122,6 +122,8 @@ ynh_store_file_checksum --file=$install_dir/.htconfig.php chmod 600 "$install_dir/.htconfig.php" chown $app:$app "$install_dir/.htconfig.php" +ynh_exec_as $app touch $data_dir/extra_conf.php + #================================================= # SET CRON JOBS #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2f11b5a..c922090 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -148,6 +148,11 @@ ynh_add_config --template="../conf/htconfig.sample.php" --destination="$install_ chmod 600 "$install_dir/.htconfig.php" chown $app:$app "$install_dir/.htconfig.php" +if [ ! -f $data_dir/extra_conf.php ] +then + ynh_exec_as $app touch $data_dir/extra_conf.php +fi + #================================================= # UPGRADE CRON JOB #================================================= From 7a8c2275e558c1b2af7d64306c9db6836a45ecee Mon Sep 17 00:00:00 2001 From: dragondaddy Date: Fri, 10 May 2024 01:07:41 +0200 Subject: [PATCH 2/4] Oopsie --- conf/htconfig.sample.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/htconfig.sample.php b/conf/htconfig.sample.php index 60a15a7..e2e9ebe 100644 --- a/conf/htconfig.sample.php +++ b/conf/htconfig.sample.php @@ -135,4 +135,4 @@ ini_set('error_log','php.log'); ini_set('log_errors','1'); // Extra settings stored in the app data dir (Service Classes, PHPMailer...) -include __DATA_DIR__/extra_conf.php +include '__DATA_DIR__/extra_conf.php'; From 3f3603a379ab5347786c8ab879babe53a17124c7 Mon Sep 17 00:00:00 2001 From: dragondaddy Date: Fri, 10 May 2024 01:38:18 +0200 Subject: [PATCH 3/4] Update admin doc --- doc/ADMIN.md | 4 ++++ doc/ADMIN_fr.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 6ddead3..8f33bbf 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -12,6 +12,10 @@ - **Failed Database after Upgrade**: If the database upgrade fails after version upgrade, you can visit the dedicated page, `https://mywebsite.domain.tld/admin/dbsync/`, and check the numbers of failed updates. These updates will have to be ran manually using software such as **phpMyAdmin**. +### Custom configuration + +- **Additional settings in .htconfig.php**: If you need to add some additional lines in .htconfig.php (as described on the [Service Classes](https://codeberg.org/streams/streams/src/commit/c75afc9ab4b9ba19628008c14459756edf9c291a/doc/admin/en/Service_Classes.mc) or [PHPMailer](https://codeberg.org/streams/streams/src/commit/c75afc9ab4b9ba19628008c14459756edf9c291a/doc/admin/en/SMTP.mc) documentation), please add it in the `/home/yunohost.app/streams/extra_conf.php` file (or `/home/yunohost.app/streams__X/extra_conf.php` if you installed more than one site). Do not touch .htconfig.php as your changes will be wiped when the YunoHost package is upgraded. + ### Git branches and code updates - **Developer Mode**: the default git branch used is 'release', which should be considered as the stable version of the software. You can, **at your own risk**, switch to the 'dev' branch. You can do this in the config panel of your app in YunoHost admin interface. You can also do it through a SSH connection by using the `git checkout dev` command in the installation directory. **In the config panel you can only switch back to 'release' branch if it is ahead of the 'dev' branch**. You can do it anytime through SSH simply use the `git checkout release` command. diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 75fd63e..1fd08ed 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -12,6 +12,10 @@ - **Échec de la base de données après la mise à niveau** : Parfois, la mise à niveau de la base de données échoue après la mise à niveau de la version. Allez sur la page dédiée de votre site, `https://monsite.domaine.tld/admin/dbsync/`, et vérifiez les références de mises à jour défaillantes. Ces mises à jour devront être exécutées manuellement, sur **phpMyAdmin**. +### Configuration personnalisée + +- **Paramètres additionnels dans .htconfig.php** : Si vous avez besoin d'ajouter des lignes supplémentaires dans .htconfig.php (comme décrit dans la documentation de [Service Classes](https://codeberg.org/streams/streams/src/commit/c75afc9ab4b9ba19628008c14459756edf9c291a/doc/admin/en/Service_Classes.mc) ou de [PHPMailer](https://codeberg.org/streams/streams/src/commit/c75afc9ab4b9ba19628008c14459756edf9c291a/doc/admin/en/SMTP.mc)), veuillez les ajouter dans le fichier `/home/yunohost.app/streams/extra_conf.php` (ou `/home/yunohost.app/streams__X/extra_conf.php` si vous avez installé plusieurs sites). Ne touchez pas à .htconfig.php car vos modifications seront effacées lors de la mise à jour du paquet YunoHost. + ### Branches git et mises à jour du code - **Mode Développeur** : la branche utilisée par défaut est 'release', qui doit être considérée comme la version stable du logiciel. Vous pouvez, **à vos risques et périls**, basculer vers la branche de développement 'dev'. Vous pouvez le faire dans le panneau de configuration de votre application dans l'interface d'administration de YunoHost. Vous pouvez aussi le faire via une connexion SSH en utilisant la commande `git checkout dev` dans le répertoire d'installation. **Dans le panneau de configuration, vous ne pouvez revenir à la branche 'release' que si elle est en avance sur la branche 'dev'**. Vous pouvez le faire à tout moment via SSH en utilisant la commande `git checkout release`. From f8a99028a6f4471cf1be2b5756a9470f3154b93c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 10 May 2024 00:30:36 +0000 Subject: [PATCH 4/4] Auto-update READMEs --- README.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c6756ac..a417337 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The [streams repository](https://codeberg.org/streams/streams/) lets you install Your websites will be compatible with **Mastodon**, **Pleroma**, **Pixelfed**, **Friendica**, **Hubzilla**, **Funkwhale**, **Peertube**, **Plume**, **WriteFreely** and many, many more. -**Shipped version:** 24.02.18~ynh3 +**Shipped version:** 24.05.10~ynh1 ## Screenshots diff --git a/README_eu.md b/README_eu.md index 4770287..ea17769 100644 --- a/README_eu.md +++ b/README_eu.md @@ -21,7 +21,7 @@ The [streams repository](https://codeberg.org/streams/streams/) lets you install Your websites will be compatible with **Mastodon**, **Pleroma**, **Pixelfed**, **Friendica**, **Hubzilla**, **Funkwhale**, **Peertube**, **Plume**, **WriteFreely** and many, many more. -**Paketatutako bertsioa:** 24.02.18~ynh3 +**Paketatutako bertsioa:** 24.05.10~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 6aac054..e862d60 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Le [dépôt streams](https://codeberg.org/streams/streams/) vous permet d'instal Vos sites web seront compatibles avec **Mastodon**, **Pleroma**, **Pixelfed**, **Friendica**, **Hubzilla**, **Funkwhale**, **Peertube**, **Plume**, **WriteFreely** et bien d'autres encore. -**Version incluse :** 24.02.18~ynh3 +**Version incluse :** 24.05.10~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index d06d205..1a05d66 100644 --- a/README_gl.md +++ b/README_gl.md @@ -21,7 +21,7 @@ The [streams repository](https://codeberg.org/streams/streams/) lets you install Your websites will be compatible with **Mastodon**, **Pleroma**, **Pixelfed**, **Friendica**, **Hubzilla**, **Funkwhale**, **Peertube**, **Plume**, **WriteFreely** and many, many more. -**Versión proporcionada:** 24.02.18~ynh3 +**Versión proporcionada:** 24.05.10~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 568760f..4c4bc27 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -3,7 +3,7 @@ 请勿手动编辑。 --> -# YunoHost 的 Streams +# YunoHost 上的 Streams [![集成程度](https://dash.yunohost.org/integration/streams.svg)](https://dash.yunohost.org/appci/app/streams) ![工作状态](https://ci-apps.yunohost.org/ci/badges/streams.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/streams.maintain.svg) @@ -21,7 +21,7 @@ The [streams repository](https://codeberg.org/streams/streams/) lets you install Your websites will be compatible with **Mastodon**, **Pleroma**, **Pixelfed**, **Friendica**, **Hubzilla**, **Funkwhale**, **Peertube**, **Plume**, **WriteFreely** and many, many more. -**分发版本:** 24.02.18~ynh3 +**分发版本:** 24.05.10~ynh1 ## 截图