only install features if they are not already installed

Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
Kai Kreuzer 2016-01-05 00:30:12 +01:00
parent ef486cff7d
commit bf23b738a0

View File

@ -78,8 +78,11 @@ public class FeatureInstaller {
private void installFeature(String name) {
try {
featuresService.installFeature(name);
logger.info("Installed '{}'", name);
Feature feature = featuresService.getFeature(name);
if (feature != null && !featuresService.isInstalled(feature)) {
featuresService.installFeature(name);
logger.info("Installed '{}'", name);
}
} catch (Exception e) {
logger.error("Failed installing '{}': {}", name, e.getMessage());
}