1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cloudlog_ynh.git synced 2024-09-03 18:16:23 +02:00

Merge pull request #20 from YunoHost-Apps/testing

cleaning
This commit is contained in:
eric_G 2023-11-14 20:15:22 +01:00 committed by GitHub
commit bc76efae31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 106 additions and 36 deletions

View file

@ -20,7 +20,7 @@ Cloudlog is an open-source PHP & MySQL based amateur radio logging application,
This is an ideal general-purpose logging application, supporting HF to Microwave, it can even interface with your radio via CAT, sync logs from WSJT-X & if you are a satellite operator integrates with SatPC32. This is an ideal general-purpose logging application, supporting HF to Microwave, it can even interface with your radio via CAT, sync logs from WSJT-X & if you are a satellite operator integrates with SatPC32.
**Shipped version:** 2.5.0~ynh1 **Shipped version:** 2.5.1~ynh1
## Screenshots ## Screenshots

View file

@ -20,7 +20,7 @@ Cloudlog est une application de journalisation radio amateur open-source basée
Il s'agit d'une application de journalisation polyvalente idéale, prenant en charge HF vers micro-ondes, elle peut même s'interfacer avec votre radio via CAT, synchroniser les journaux de WSJT-X et si vous êtes un opérateur satellite, s'intègre à SatPC32. Il s'agit d'une application de journalisation polyvalente idéale, prenant en charge HF vers micro-ondes, elle peut même s'interfacer avec votre radio via CAT, synchroniser les journaux de WSJT-X et si vous êtes un opérateur satellite, s'intègre à SatPC32.
**Version incluse :** 2.5.0~ynh1 **Version incluse :** 2.5.1~ynh1
## Captures décran ## Captures décran

98
conf/database.php Normal file
View file

@ -0,0 +1,98 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| ['dsn'] The full DSN string describe a connection to the database.
| ['hostname'] The hostname of your database server.
| ['username'] The username used to connect to the database
| ['password'] The password used to connect to the database
| ['database'] The name of the database you want to connect to
| ['dbdriver'] The database driver. e.g.: mysqli.
| Currently supported:
| cubrid, ibase, mssql, mysql, mysqli, oci8,
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['dbprefix'] You can add an optional prefix, which will be added
| to the table name when using the Query Builder class
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
| ['cachedir'] The path to the folder where cache files should be stored
| ['char_set'] The character set used in communicating with the database
| ['dbcollat'] The character collation used in communicating with the database
| NOTE: For MySQL and MySQLi databases, this setting is only used
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
| (and in table creation queries made with DB Forge).
| There is an incompatibility in PHP with mysql_real_escape_string() which
| can make your site vulnerable to SQL injection if you are using a
| multi-byte character set and are running versions lower than these.
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
| ['encrypt'] Whether or not to use an encrypted connection.
|
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
| 'ssl_key' - Path to the private key file
| 'ssl_cert' - Path to the public key certificate file
| 'ssl_ca' - Path to the certificate authority file
| 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only)
|
| ['compress'] Whether or not to use client compression (MySQL only)
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
| NOTE: Disabling this will also effectively disable both
| $this->db->last_query() and profiling of DB queries.
| When you run a query, with this setting set to TRUE (default),
| CodeIgniter will store the SQL statement for debugging purposes.
| However, this may cause high memory usage, especially if you run
| a lot of SQL queries ... disable this to avoid that problem.
|
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the 'default' group).
|
| The $query_builder variables lets you determine whether or not to load
| the query builder class.
*/
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
// The following values will probably need to be changed.
'dsn' => '',
'hostname' => 'localhost',
'username' => '__DB_NAME__',
'password' => '__DB_PWD__',
'database' => '__DB_USER__',
// The following values can probably stay the same.
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => TRUE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8mb4',
'dbcollat' => 'utf8mb4_0900_ai_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);

View file

@ -5,7 +5,7 @@ name = "CloudLog"
description.en = "Web based amateur radio logging application" description.en = "Web based amateur radio logging application"
description.fr = "Application Web d'enregistrement radioamateur" description.fr = "Application Web d'enregistrement radioamateur"
version = "2.5.0~ynh1" version = "2.5.1~ynh1"
maintainers = ["eric_G"] maintainers = ["eric_G"]
@ -37,8 +37,8 @@ ram.runtime = "50M"
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.main]
url = "https://github.com/magicbug/Cloudlog/archive/refs/tags/2.5.0.tar.gz" url = "https://github.com/magicbug/Cloudlog/archive/refs/tags/2.5.1.tar.gz"
sha256 = "074bdf9320ceb29e3705a8a63b2bdcddf1f9e6893be4b85522bc531ef12d06a6" sha256 = "ad7d680aa3b76f26741e387a73d07432614144e44031b0cdf04d11e9aec86772"
autoupdate.strategy = "latest_github_tag" autoupdate.strategy = "latest_github_tag"
[resources.system_user] [resources.system_user]

View file

@ -26,31 +26,16 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config using the conf/php-fpm.conf or conf/extra_php-fpm.conf ynh_add_fpm_config
ynh_add_fpm_config --usage=low --footprint=low
# Create a dedicated NGINX config using the conf/nginx.conf template
ynh_add_nginx_config ynh_add_nginx_config
# Use logrotate to manage application logfile(s)
ynh_use_logrotate ynh_use_logrotate
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
chown root: "/etc/cron.d/$app" chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app"
#=================================================
# APP INITIAL CONFIGURATION
#=================================================
# ADD A CONFIGURATION
#=================================================
# ynh_script_progression --message="Adding a configuration file..." --weight=1
# ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file"
# chmod 400 "$install_dir/some_config_file"
# chown $app:$app "$install_dir/some_config_file"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -48,7 +48,6 @@ ynh_restore_file --origin_path="/etc/cron.d/$app"
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
# Typically you only have either $app or php-fpm but not both at the same time...
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -32,24 +32,12 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
ynh_add_fpm_config --usage=low --footprint=low ynh_add_fpm_config
ynh_add_nginx_config ynh_add_nginx_config
ynh_use_logrotate --non-append ynh_use_logrotate --non-append
#=================================================
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
#=================================================
# UPDATE A CONFIG FILE
#=================================================
# ynh_script_progression --message="Updating a configuration file..." --weight=1
# ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file"
# chmod 400 "$install_dir/some_config_file"
# chown $app:$app "$install_dir/some_config_file"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================