View previous topic :: View next topic |
Author |
Message |
mos-eisley
Joined: 21 Mar 2007 Posts: 76 Location: Klarup (AAlborg), Demark
|
Posted: Wed Apr 25, 2007 4:42 am Post subject: RMA will not restart apache |
|
|
I have a Debian system with an apache and RMA running (well).
A process check check for apache processes, and if this fails, it should execute an Action Profile "RestartLinuxApache", with contains the action "Execute external program", with these attributes:
The Command Line being:
/etc/init.d/apache stop;sleep 5;/etc/init.d/apache start
When I kill the apache process to test, I see this in the syslog:
25-04-2007 12:31:37 Action "Execute external program" executed by RMA "pai05500-1.vfnz.a.p"
But the apache never restarts on the server...why? |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Wed Apr 25, 2007 6:34 am Post subject: |
|
|
I think, you should create simple script file, e.g. restart_apache.sh, and specify that particular script name into "Command line box", like: /opt/custom/restart_apache.sh
The body of the restart_apache.sh:
Code: | #!/bin/sh
/etc/init.d/apache stop;
sleep 5;
/etc/init.d/apache start |
Regards,
Max |
|
Back to top |
|
|
mos-eisley
Joined: 21 Mar 2007 Posts: 76 Location: Klarup (AAlborg), Demark
|
Posted: Wed Apr 25, 2007 6:44 am Post subject: |
|
|
Well, that works - just ¤#%&#¤&&%¤ me off that I need to create, maintain, distribute and execute multiple commands ( e.g. scripts) that way |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Wed Apr 25, 2007 7:34 am Post subject: |
|
|
Sorry, RMA is unable to perform several commands in one line.
Regards,
Max |
|
Back to top |
|
|
mos-eisley
Joined: 21 Mar 2007 Posts: 76 Location: Klarup (AAlborg), Demark
|
Posted: Thu Apr 26, 2007 12:29 am Post subject: |
|
|
Well, this worked:
/etc/init.d/apache restart
Still, multicommand support would be prefered |
|
Back to top |
|
|
|