No clearsign

This commit is contained in:
Sven Seeberg 2020-10-29 21:34:34 +01:00
parent ba4e57504c
commit dda155ee81
Signed by: sven.seeberg
GPG key ID: 29559DD5A83806B5

View file

@ -113,15 +113,15 @@ function create_text_file($cfg, $body) {
file_put_contents($file_path, $line, FILE_APPEND);
}
file_put_contents($file_path, "\n\n\n", FILE_APPEND);
shell_exec("gpg --yes --clearsign " . $file_path);
shell_exec("gpg " . $file_path);
sync_command($cfg, $file_path);
return trim(shell_exec("/usr/bin/sha256sum " . $file_path. ".asc | awk '{ print $1 }'"));
return trim(shell_exec("/usr/bin/sha256sum " . $file_path. " | awk '{ print $1 }'"));
}
function sync_command($cfg, $file_path) {
$cmd = $cfg["export"]["synccmd"];
if (strlen($cmd) > 0) {
$cmd = str_replace("%s", $file_path . ".asc", $cmd);
$cmd = str_replace("%s", $file_path . ".gpg", $cmd);
$cmd = str_replace("%u", $file_path, $cmd);
shell_exec($cmd);
}