pki: delete cacert alias from keystore before import

Java keystore will not overwrite certificate, leaving the previous one.

Change-Id: Ib0ea2404ff43c106f40ddc89cf13cb2b8d7caeab
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: engine-service: cleanup pyflakes warnings

Change-Id: I2186d79e96aaf2789ee860e7e7e34a20d71e6287
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: engine-service: use kill to detect running processes

Change-Id: I20238c634c418029c669bdf2b4b77e329b39faa1
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: engine-service: rework start pid file handling

There is no reason to force user to explicit stop and start the service
in case pid file contains non running process.

Change-Id: I8d8a7f8f8b7f5941f447df3d279686b973b5c393
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: engine-service: do not fail if setsid fails

setsid fails if already session leader.

Change-Id: I7092aa2d009875fcf45c560a6d480901016d5273
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: engine-service: leave valid fd at stdin

Change-Id: Ib029542a45f7fa6e486ae3876b20d18c56374228
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: engine-service: add options for wrappers

In order to be used at other environments, with their own init.d layout,

Add:
  --quiet
  --pidfile
  --foreground

Change-Id: I00d868fc51ec73800cae2eb24002feb933744851
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: engine-setup re-write using otopi

Change-Id: I4d5e3ac7927802326e324c9b98ada75b421638aa
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
Signed-off-by: Alex Lourie <alourie@redhat.com>