mirror of
https://github.com/unraid/api.git
synced 2026-01-01 06:01:18 -06:00
fix: logrotate error
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { writeFile } from 'fs/promises';
|
import { writeFile } from 'fs/promises';
|
||||||
|
|
||||||
import { fileExists } from '@app/core/utils/files/file-exists';
|
import { fileExists } from '@app/core/utils/files/file-exists';
|
||||||
|
|
||||||
export const setupLogRotation = async () => {
|
export const setupLogRotation = async () => {
|
||||||
@@ -8,12 +9,13 @@ export const setupLogRotation = async () => {
|
|||||||
await writeFile(
|
await writeFile(
|
||||||
'/etc/logrotate.d/unraid-api',
|
'/etc/logrotate.d/unraid-api',
|
||||||
`
|
`
|
||||||
/var/log/unraid-api/*.log {
|
/var/log/unraid-api/*.log {
|
||||||
rotate 1
|
rotate 1
|
||||||
missingok
|
missingok
|
||||||
size 5M
|
size 5M
|
||||||
}
|
su root root
|
||||||
`,
|
}
|
||||||
|
`,
|
||||||
{ mode: '644' }
|
{ mode: '644' }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user