{
"code_name": "csv_backup",
"unique_prefix": "CSVBCKP",
"enabled": true,
"data_source": "script",
"show_ui": false,
"localized": ["display_name", "description", "icon"],
"display_name": [
{
"language_code": "en_us",
"string": "CSV backup"
},
{
"language_code": "es_es",
"string": "N/A"
}
],
"icon": [
{
"language_code": "en_us",
"string": ""
}
],
"description": [
{
"language_code": "en_us",
"string": "A plugin to auto-generate devices.csv backups."
},
{
"language_code": "es_es",
"string": "N/A"
}
],
"params" : [{
"name" : "overwrite",
"type" : "setting",
"value" : "CSVBCKP_overwrite"
},
{
"name" : "location",
"type" : "setting",
"value" : "CSVBCKP_location"
}
],
"settings": [
{
"function": "RUN",
"type": "text.select",
"default_value":"disabled",
"options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"],
"localized": ["name", "description"],
"name" :[{
"language_code":"en_us",
"string" : "When to run"
},
{
"language_code":"es_es",
"string" : "Cuándo ejecuta"
}],
"description": [{
"language_code":"en_us",
"string" : "When the backup should be created. A daily or weekly SCHEDULE is a good option."
}]
},
{
"function": "CMD",
"type": "readonly",
"default_value": "python3 /home/pi/pialert/front/plugins/csv_backup/script.py overwrite={overwrite} location={location}",
"options": [],
"localized": ["name", "description"],
"name": [
{
"language_code": "en_us",
"string": "Command"
},
{
"language_code": "es_es",
"string": "Comando"
}
],
"description": [
{
"language_code": "en_us",
"string": "Command to run. This can not be changed"
},
{
"language_code": "es_es",
"string": "Comando a ejecutar. Esto no se puede cambiar"
}
]
},
{
"function": "RUN_SCHD",
"type": "text",
"default_value":"0 2 * * 3",
"options": [],
"localized": ["name", "description"],
"name" : [{
"language_code":"en_us",
"string" : "Schedule"
},
{
"language_code":"es_es",
"string" : "Schedule"
}],
"description": [{
"language_code":"en_us",
"string" : "Only enabled if you select schedule in the CSVBCKP_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at crontab.guru). For example entering 0 4 * * * will run the scan after 4 am in the TIMEZONE you set above. Will be run NEXT time the time passes."
},
{
"language_code":"es_es",
"string" : "Solo está habilitado si selecciona schedule en la configuración CSVBCKP_RUN. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en crontab.guru). Por ejemplo, ingresar 0 4 * * * ejecutará el escaneo después de las 4 a.m. en el TIMEZONE código> que configuró arriba. Se ejecutará la PRÓXIMA vez que pase el tiempo."
}]
},
{
"function": "RUN_TIMEOUT",
"type": "integer",
"default_value": 30,
"options": [],
"localized": ["name", "description"],
"name": [
{
"language_code": "en_us",
"string": "Run timeout"
},
{
"language_code": "es_es",
"string": "Tiempo límite de ejecución"
}
],
"description": [
{
"language_code": "en_us",
"string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
},
{
"language_code": "es_es",
"string": "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela."
}
]
},
{
"function": "overwrite",
"type": "boolean",
"default_value":false,
"options": [],
"localized": ["name", "description"],
"name" : [{
"language_code":"en_us",
"string" : "Overwrite file"
}],
"description": [{
"language_code":"en_us",
"string" : "If the devices.csv file should be always overwritten. If disabled, the date and time is added to the name."
}]
},
{
"function": "location",
"type": "text",
"default_value":"/home/pi/pialert/config",
"options": [],
"localized": ["name", "description"],
"name" : [{
"language_code":"en_us",
"string" : "File location"
}],
"description": [{
"language_code":"en_us",
"string" : "Where the devices.csv file should be saved. For example /home/pi/pialert/config."
}]
}
],
"database_column_definitions":
[
]
}