1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mytinytodo_ynh.git synced 2024-09-03 19:46:01 +02:00
This commit is contained in:
ericgaspar 2022-10-23 09:28:02 +02:00
parent 75561823e7
commit 97ce07a5e3
3 changed files with 27 additions and 62 deletions

View file

@ -1,63 +1,24 @@
<?php
# Configuration goes here
$config = array();
/*
Uncomment the line with MTT_DB_TYPE if you make clean install only.
Leave it commented (with # at start) if you are upgrading from version before 1.7.
Select the database type: sqlite or mysql.
*/
# Set a title for MyTinyTodo
$config['title'] = '__TITLE__';
define("MTT_DB_TYPE", "mysql");
# Database type: sqlite or mysql
$config['db'] = 'mysql';
define("MTT_DB_HOST", "localhost");
# Specify these settings if you selected above to use Mysql
$config['mysql.host'] = "localhost";
$config['mysql.db'] = "__DB_NAME__";
$config['mysql.user'] = "__DB_USER__";
$config['mysql.password'] = "__DB_PWD__";
define("MTT_DB_NAME", "__DB_NAME__");
# Tables prefix
$config['prefix'] = "mtt_";
define("MTT_DB_USER", "__DB_USER__");
# These two parameters are used when mytinytodo index.php called not from installation directory
# 'url' - URL where index.php is called from (ex.: http://site.com/todo.php)
# 'mtt_url' - directory URL where mytinytodo is installed (with trailing slash) (ex.: http://site.com/lib/mytinytodo/)
$config['url'] = '';
$config['mtt_url'] = '';
define("MTT_DB_PASSWORD", "__DB_PWD__");
# Language pack
$config['lang'] = "__LANGUAGE__";
define("MTT_DB_PREFIX", "");
# Specify password here to protect your tasks from modification,
# or leave empty that everyone could read/write todolist
$config['password'] = "__SET_PASSWORD__";
// set mysqli if needed
define("MTT_DB_DRIVER", "mysqli");
# To disable smart syntax uncomment the line below
#$config['smartsyntax'] = 0;
# Default Time zone
$config['timezone'] = '__TIMEZONE__';
# To disable auto adding selected tag comment out the line below or set value to 0
$config['autotag'] = 1;
# duedate calendar format: 1 => y-m-d (default), 2 => m/d/y, 3 => d.m.y
$config['duedateformat'] = 1;
# First day of week: 0-Sunday, 1-Monday, 2-Tuesday, .. 6-Saturday
$config['firstdayofweek'] = 1;
# select session handling mechanism: files or default (php default)
$config['session'] = 'files';
# Date/time formats
$config['clock'] = 24;
$config['dateformat'] = 'j M Y';
$config['dateformatshort'] = 'j M';
# Show task date in list
$config['showdate'] = 0;
# Autodetect mobile devices and switch theme
$config['detectmobile'] = 1;
?>
define("MTT_SALT", "Put random text here");

View file

@ -116,10 +116,10 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/config.php" --destination="$final_path/db/config.php"
ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php"
chmod 600 "$final_path/db/config.php"
chown $app:$app "$final_path/db/config.php"
chmod 600 "$final_path/config.php"
chown $app:$app "$final_path/config.php"
#chmod 775 "$final_path/tmp/sessions"
#=================================================
@ -127,7 +127,6 @@ chown $app:$app "$final_path/db/config.php"
#=================================================
ynh_secure_remove --file="$final_path/setup.php"
ynh_secure_remove --file="$final_path/db/todolist.db"
#=================================================
# SETUP SSOWAT

View file

@ -94,7 +94,7 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=2
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --keep="db/config.php"
ynh_setup_source --dest_dir="$final_path" --keep="config.php"
fi
chmod 750 "$final_path"
@ -127,12 +127,17 @@ ynh_add_nginx_config
#=================================================
# RESTORE USER RIGHTS
#=================================================
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php"
chmod 600 "$final_path/config.php"
chown $app:$app "$final_path/config.php"
ynh_secure_remove --file="$final_path/setup.php"
ynh_secure_remove --file="$final_path/db/todolist.db"
chmod 600 $final_path/db/config.php
chmod 755 $final_path/tmp/sessions
#=================================================
# RELOAD NGINX