From 6b511c4b504303d05e930e01a999c919ec9c7bbc Mon Sep 17 00:00:00 2001 From: Mustafa Baser Date: Tue, 3 May 2022 15:45:52 +0300 Subject: [PATCH] feat: jans-linux-setup set DefaultTimeoutStartSec=300s (#1279) --- .../jans_setup/setup_app/installers/jans.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/jans-linux-setup/jans_setup/setup_app/installers/jans.py b/jans-linux-setup/jans_setup/setup_app/installers/jans.py index 19c04a3ff0d..d8c8df7e506 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/jans.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/jans.py @@ -132,6 +132,20 @@ def configureSystem(self): if Config.persistence_type == 'hybrid': self.writeHybridProperties() + # set systemd start timeout to 5 mins + systemd_conf_fn = '/etc/systemd/system.conf' + systemd_conf = [] + + for l in open(systemd_conf_fn): + tl = l.strip('#').strip() + if tl.startswith('DefaultTimeoutStartSec'): + systemd_conf.append('DefaultTimeoutStartSec=300s\n') + else: + systemd_conf.append(l) + + self.writeFile(systemd_conf_fn, ''.join(systemd_conf)) + + def makeFolders(self): # Create these folder on all instances for folder in (Config.jansOptFolder, Config.jansOptBinFolder, Config.jansOptSystemFolder,