[Dovecot: Imapsync] Parse, save and show last run status (#4253)

* [imapsync] - check for errors in returned_text

Signed-off-by: Kristian Feldsam <feldsam@gmail.com>

* [imapsync] parse and save exit status

Signed-off-by: Kristian Feldsam <feldsam@gmail.com>

* [dovecot] updated image version

Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
This commit is contained in:
Kristian Feldsam
2021-09-01 16:29:11 +02:00
committed by GitHub
parent e3b58c6b80
commit 54c4d7e49c
10 changed files with 106 additions and 11 deletions

View File

@@ -1673,6 +1673,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
$user1 = (!empty($_data['user1'])) ? $_data['user1'] : $is_now['user1'];
$active = (isset($_data['active'])) ? intval($_data['active']) : $is_now['active'];
$last_run = (isset($_data['last_run'])) ? NULL : $is_now['last_run'];
$success = (isset($_data['success'])) ? NULL : $is_now['success'];
$delete2duplicates = (isset($_data['delete2duplicates'])) ? intval($_data['delete2duplicates']) : $is_now['delete2duplicates'];
$subscribeall = (isset($_data['subscribeall'])) ? intval($_data['subscribeall']) : $is_now['subscribeall'];
$delete1 = (isset($_data['delete1'])) ? intval($_data['delete1']) : $is_now['delete1'];
@@ -1768,6 +1769,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
`exclude` = :exclude,
`host1` = :host1,
`last_run` = :last_run,
`success` = :success,
`user1` = :user1,
`password1` = :password1,
`mins_interval` = :mins_interval,
@@ -1794,6 +1796,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
':user1' => $user1,
':password1' => $password1,
':last_run' => $last_run,
':success' => $success,
':mins_interval' => $mins_interval,
':port1' => $port1,
':enc1' => $enc1,

View File

@@ -3,7 +3,7 @@ function init_db_schema() {
try {
global $pdo;
$db_version = "01072021_0630";
$db_version = "23082021_2224";
$stmt = $pdo->query("SHOW TABLES LIKE 'versions'");
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
@@ -632,6 +632,8 @@ function init_db_schema() {
"is_running" => "TINYINT(1) NOT NULL DEFAULT '0'",
"returned_text" => "LONGTEXT",
"last_run" => "TIMESTAMP NULL DEFAULT NULL",
"success" => "TINYINT(1) UNSIGNED DEFAULT NULL",
"exit_status" => "VARCHAR(50) DEFAULT NULL",
"created" => "DATETIME(0) NOT NULL DEFAULT NOW(0)",
"modified" => "DATETIME ON UPDATE CURRENT_TIMESTAMP",
"active" => "TINYINT(1) NOT NULL DEFAULT '0'"