imthekrish Respected Contributor.
Respected Contributor.
630 views

Stop/start apache server

Hello All,

I would like to stop/start apache server from HPOO, I have script on the server and I'm using /Base [1.10.0]/Library/Operations/Remote Command Execution/SSH/v1.0/SSH Command operation. My script expects a passphrase. I can't remove passphrase prompt. How do I handle this  using hpoo, my understanding is there is no interactive mode here.

0 Likes
2 Replies
scuda20 Super Contributor.
Super Contributor.

Re: Stop/start apache server

If you need to interact and pass info to repsonses then you might be better off using SSH/v2.0/ Shell logon|Shell | Logoff.  You will then be able to use expect and pass variables to and interact with your script. Here is an example where I am configuring a quagga router... Where ${password} is the obfuscated password I had in my vars, ${routing} is my routing configuration that I created within my flow.

send sudo su
expectEndsWith :
send ${password}
expectEndsWith #
send vtysh
expectEndsWith #
send conf t
expectEndsWith #
${routing}
send wr mem
expectEndsWith #
send exit
expectEndsWith #

imthekrish Respected Contributor.
Respected Contributor.

Re: Stop/start apache server

I dont know if expectEndsWith one particluar symbol like #, $,>. It could be different on different servers. Any suggestions on Regex here. I tried few didnt work. 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.