Commit 2fe706b3 authored by Boris Djalal's avatar Boris Djalal

Adding sourcing the daemon function when running on CentOS.

Signed-off-by: default avatarBoris Djalal <boris.djalal@eurecom.fr>
parent 821647ad
......@@ -401,6 +401,9 @@ class SSHConnection():
self.command('mkdir -p ' + self.EPCSourceCodePath + '/scripts', '\$', 5)
self.command('cd /opt/hss_sim0609', '\$', 5)
self.command('echo ' + self.EPCPassword + ' | sudo -S rm -f hss.log daemon.log', '\$', 5)
#to use daemon on CentOS we need to source the function
if re.match('(.*)CentOS(.*)', linux_distro, re.IGNORECASE):
self.command('source /etc/init.d/functions', '\$', 5)
self.command('echo ' + self.EPCPassword + ' | sudo -S echo "Starting sudo session" && sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real ', '\$', 5)
self.close()
self.CreateHtmlTestRow(self.EPCType, 'OK', ALL_PROCESSES_OK)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment