Point botconfig and botlogs to data/ subdirectory
Matches bashyBot's new data/ layout for safe www-data write access. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
796bc15302
commit
3d7b620b6c
2 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ $project = $stmt->fetch();
|
|||
if (!$project) { http_response_code(404); echo json_encode(['error' => 'Project not found']); exit; }
|
||||
|
||||
$base = realpath($project['path']);
|
||||
$config_path = $base . '/config.json';
|
||||
$config_path = $base . '/data/config.json';
|
||||
|
||||
if (!$base || !is_dir($base)) {
|
||||
echo json_encode(['error' => 'Project path not accessible']); exit;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ if (!$project) { http_response_code(404); echo json_encode(['error' => 'Project
|
|||
$psStmt = $db->prepare('SELECT value FROM project_settings WHERE project_id = ? AND key = ?');
|
||||
$psStmt->execute([$pid, 'bot_log_file']);
|
||||
$row = $psStmt->fetch();
|
||||
$rel = $row ? $row['value'] : 'logs/bashybot.log';
|
||||
$rel = $row ? $row['value'] : 'data/bashybot.log';
|
||||
|
||||
$base = realpath($project['path']);
|
||||
$logPath = realpath($base . '/' . ltrim($rel, '/'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue