mirror of
https://github.com/YunoHost-Apps/kanboard_ynh.git
synced 2024-09-03 19:36:17 +02:00
data dir
This commit is contained in:
parent
5692d8df14
commit
09eb0fb0e2
4 changed files with 25 additions and 5 deletions
|
@ -7,7 +7,7 @@
|
|||
/*******************************************************************/
|
||||
|
||||
// Data folder (must be writeable by the web server user and absolute)
|
||||
define('DATA_DIR', __DIR__.DIRECTORY_SEPARATOR.'data');
|
||||
define('DATA_DIR', __DATA_DIR__);
|
||||
|
||||
// Enable/Disable debug
|
||||
define('DEBUG', false);
|
||||
|
@ -16,10 +16,10 @@ define('DEBUG', false);
|
|||
define('LOG_DRIVER', 'system');
|
||||
|
||||
// Log filename if the log driver is "file"
|
||||
define('LOG_FILE', DATA_DIR.DIRECTORY_SEPARATOR.'debug.log');
|
||||
define('LOG_FILE', __DATA_DIR__/debug.log');
|
||||
|
||||
// Plugins directory
|
||||
define('PLUGINS_DIR', __DIR__.DIRECTORY_SEPARATOR.'plugins');
|
||||
define('PLUGINS_DIR', __INSTALL_DIR__/plugins);
|
||||
|
||||
// Plugins directory URL
|
||||
define('PLUGIN_API_URL', 'https://kanboard.org/plugins.json');
|
||||
|
@ -33,10 +33,10 @@ define('PLUGIN_INSTALLER', true);
|
|||
define('CACHE_DRIVER', 'memory');
|
||||
|
||||
// Cache folder to use if cache driver is "file" (must be writeable by the web server user)
|
||||
define('CACHE_DIR', DATA_DIR.DIRECTORY_SEPARATOR.'cache');
|
||||
define('CACHE_DIR', __DATA_DIR__/cache);
|
||||
|
||||
// Folder for uploaded files (must be writeable by the web server user)
|
||||
define('FILES_DIR', DATA_DIR.DIRECTORY_SEPARATOR.'files');
|
||||
define('FILES_DIR', __DATA_DIR__/files);
|
||||
|
||||
// Enable/disable email configuration from the user interface
|
||||
define('MAIL_CONFIGURATION', true);
|
||||
|
|
|
@ -54,6 +54,9 @@ ram.runtime = "50M"
|
|||
|
||||
[resources.install_dir]
|
||||
|
||||
[resources.data_dir]
|
||||
subdirs = ["cache", "files"]
|
||||
|
||||
[resources.permissions]
|
||||
main.url = "/"
|
||||
#main.auth_header = false
|
||||
|
|
|
@ -21,6 +21,13 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE DATA DIR
|
||||
#=================================================
|
||||
|
||||
# Only relevant if there is a "data_dir" resource for this app
|
||||
ynh_backup --src_path="$data_dir" --is_big
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -24,6 +24,16 @@ chmod -R 700 $install_dir/sessions
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the data directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
|
||||
# (Same as for install dir)
|
||||
chown -R $app:www-data "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue