diff --git a/src/freedombone-app-kanboard b/src/freedombone-app-kanboard index a33da4ef..ce5d2d74 100755 --- a/src/freedombone-app-kanboard +++ b/src/freedombone-app-kanboard @@ -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 {