kanboard logging functions

This commit is contained in:
Bob Mottram 2017-08-07 13:32:16 +01:00
parent 22557c6359
commit a59a84a0a3
1 changed files with 14 additions and 4 deletions

View File

@ -48,13 +48,23 @@ kanboard_variables=(ONION_ONLY
MY_USERNAME)
function logging_on_kanboard {
kanboard_configfile=/var/www/${KANBOARD_DOMAIN_NAME}/htdocs/config.php
sed -i "s|define('LOG_FILE'.*|define('LOG_FILE', DATA_DIR.DIRECTORY_SEPARATOR.'debug.log');|g" $kanboard_configfile
read_config_param KANBOARD_DOMAIN_NAME
if [ $KANBOARD_DOMAIN_NAME ]; then
kanboard_configfile=/var/www/${KANBOARD_DOMAIN_NAME}/htdocs/config.php
if [ -f $kanboard_configfile ]; then
sed -i "s|define('LOG_FILE'.*|define('LOG_FILE', DATA_DIR.DIRECTORY_SEPARATOR.'debug.log');|g" $kanboard_configfile
fi
fi
}
function logging_off_kanboard {
kanboard_configfile=/var/www/${KANBOARD_DOMAIN_NAME}/htdocs/config.php
sed -i "s|define('LOG_FILE'.*|define('LOG_FILE', '/dev/null');|g" $kanboard_configfile
read_config_param KANBOARD_DOMAIN_NAME
if [ $KANBOARD_DOMAIN_NAME ]; then
kanboard_configfile=/var/www/${KANBOARD_DOMAIN_NAME}/htdocs/config.php
if [ -f $kanboard_configfile ]; then
sed -i "s|define('LOG_FILE'.*|define('LOG_FILE', '/dev/null');|g" $kanboard_configfile
fi
fi
}
function remove_user_kanboard {