<div dir="ltr">Dewangga<div><br></div><div>Just to add information, about your question, the command to restart service should be after else</div><div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">###</div><div style="font-family:arial,sans-serif;font-size:13px"><div>#!/bin/bash</div><div>if [ -f /var/log/ref_teste ]; then</div><div>  echo "Script was defined - $(date)"           | tee -a /var/log/messages</div><div>  echo "Removing $0 from /etc/cron.hourly"      | tee -a /var/log/messages</div><div>  echo "### rm -rf /etc/cron.hourly/$0"         | tee -a /var/log/messages</div><div>else</div><div>  echo "TEST ### $(date) ###"                   | tee -a /var/log/messages</div><div>  </div><div>  # Command here !!!!</div><div>  service xpto_daemon restart</div><div><br></div><div>  touch /var/log/ref_teste</div><div>fi</div></div><div style="font-family:arial,sans-serif;font-size:13px">###</div></div></div><div class="gmail_extra"><br clear="all"><div><div>______________<br>Atenciosamente<br>Waldirio<br>msn: <a href="mailto:waldirio@gmail.com" target="_blank">waldirio@gmail.com</a><br>Skype: waldirio<br>Site: <a href="http://www.waldirio.com.br" target="_blank">www.waldirio.com.br</a><br>Blog: <a href="http://blog.waldirio.com.br" target="_blank">blog.waldirio.com.br</a></div>
<div>LinkedIn: <a href="http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646" target="_blank">http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646</a><br>PGP: <a href="http://www.waldirio.com.br/public.html" target="_blank">www.waldirio.com.br/public.html</a></div></div>
<br><div class="gmail_quote">On Thu, Oct 16, 2014 at 1:18 AM, Waldirio Manhães Pinheiro <span dir="ltr"><<a href="mailto:waldirio@gmail.com" target="_blank">waldirio@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Dewangga and list friends, good morning<div><br></div><div>By default the Spacewalk don't have this feature, btw you can do things like bellow:</div><div><br></div><div>1. Create a rpm just to do what you need, so you configure in conf. channel the package and the command will be executed (I know, I don't like too, but it work).</div><div><br></div><div>2. Create a script like bellow in /etc/cron.hourly. Sure you will change, remove comments and define to your environment, but this will work too. The command will not be execute at the same time of deploy, but on the next 01 minute of next hour.</div><div><br></div><div>###</div><div><div>#!/bin/bash</div><div>if [ -f /var/log/ref_teste ]; then</div><div>  echo "Script was defined - $(date)"           | tee -a /var/log/messages</div><div>  echo "Removing $0 from /etc/cron.hourly"      | tee -a /var/log/messages</div><div>  echo "### rm -rf /etc/cron.hourly/$0"         | tee -a /var/log/messages</div><div>else</div><div>  echo "TEST ### $(date) ###"                   | tee -a /var/log/messages</div><div>  touch /var/log/ref_teste</div><div>fi</div></div><div>###</div><div><br></div><div>I'll prepare a real sample and create a post in my blog. Good question! ;-)</div><div><br></div><div>Take Care and let me know if work to you.</div></div><div class="gmail_extra"><br clear="all"><div><div>______________<br>Atenciosamente<br>Waldirio<br>msn: <a href="mailto:waldirio@gmail.com" target="_blank">waldirio@gmail.com</a><br>Skype: waldirio<br>Site: <a href="http://www.waldirio.com.br" target="_blank">www.waldirio.com.br</a><br>Blog: <a href="http://blog.waldirio.com.br" target="_blank">blog.waldirio.com.br</a></div>
<div>LinkedIn: <a href="http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646" target="_blank">http://br.linkedin.com/pub/waldirio-pinheiro/22/b21/646</a><br>PGP: <a href="http://www.waldirio.com.br/public.html" target="_blank">www.waldirio.com.br/public.html</a></div></div><div><div class="h5">
<br><div class="gmail_quote">On Thu, Oct 16, 2014 at 12:19 AM, Dewangga Bachrul Alam <span dir="ltr"><<a href="mailto:dewanggaba@xtremenitro.org" target="_blank">dewanggaba@xtremenitro.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I've try to centralize SSL Configuration Files, (eg.<br>
/etc/nginx/conf.d/ssl.conf), but, after changes that files, I should<br>
reload the nginx automatically after deployed the files.<br>
<br>
I add action chaining manually to deployment schedule, is it possible to<br>
automate them? I mean that remote command `service nginx reload` saved<br>
on configuration files too.<br>
<br>
Is it possible?<br>
<br>
_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>