fix: use env only
This commit is contained in:
31
server/utils/backup-scripts.ts
Normal file
31
server/utils/backup-scripts.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
export type BackupScript = {
|
||||
key: string
|
||||
label: string
|
||||
icon?: string
|
||||
downloadFolders?: string[]
|
||||
}
|
||||
|
||||
export const backupScripts: BackupScript[] = [
|
||||
{
|
||||
key: "backup-bdd-recette",
|
||||
label: "Backup BDD recette",
|
||||
icon: "mdi:database-export",
|
||||
downloadFolders: ["ferme", "inventory", "sirh", "user"]
|
||||
},
|
||||
{
|
||||
key: "check-statut-recette",
|
||||
label: "Check statut recette",
|
||||
icon: "mdi:server-network"
|
||||
},
|
||||
{
|
||||
key: "backup-vaultwarden",
|
||||
label: "Backup vaultwarden",
|
||||
icon: "mdi:data",
|
||||
downloadFolders: ["bitwarden"]
|
||||
}
|
||||
]
|
||||
|
||||
export function getBackupScriptCommand(key: string) {
|
||||
const envKey = `BACKUP_SCRIPT_COMMAND_${key.toUpperCase().replace(/-/g, "_")}`
|
||||
return process.env[envKey] || null
|
||||
}
|
||||
Reference in New Issue
Block a user