<div dir="ltr">Hello, good morning<div><br></div><div>About big effort, not so much and this is the cost to execute automatically. :-), in fact you will create this script when you need some action after deploy, just on this cases.</div><div><br></div><div>About el7, sure will not, you have to change to system control.</div><div><br></div><div>ps.: You can create a single script and inside else you will use "case" for example. Case el6 do ..., case el7 do ...</div><div><br></div><div>B'Regards</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 2:56 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 Waldirio,<br>
<br>
Thanks for your help, but I think it will be make big effort every<br>
create/changes deployment on each files. Isn't it?<br>
<br>
IMHO & CMIIW, your scripts won't work on el7.<br>
<div class="HOEnZb"><div class="h5"><br>
On 10/16/2014 11:20 AM, Waldirio Manhães Pinheiro wrote:<br>
> Dewangga<br>
><br>
> Just to add information, about your question, the command to restart<br>
> service should be after else<br>
><br>
> ###<br>
> #!/bin/bash<br>
> if [ -f /var/log/ref_teste ]; then<br>
>   echo "Script was defined - $(date)"           | tee -a /var/log/messages<br>
>   echo "Removing $0 from /etc/cron.hourly"      | tee -a /var/log/messages<br>
>   echo "### rm -rf /etc/cron.hourly/$0"         | tee -a /var/log/messages<br>
> else<br>
>   echo "TEST ### $(date) ###"                   | tee -a /var/log/messages<br>
><br>
>   # Command here !!!!<br>
>   service xpto_daemon restart<br>
><br>
>   touch /var/log/ref_teste<br>
> fi<br>
> ###<br>
><br>
> ______________<br>
> Atenciosamente<br>
> Waldirio<br>
> msn: <a href="mailto:waldirio@gmail.com">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><br>
> 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><br>
><br>
> On Thu, Oct 16, 2014 at 1:18 AM, Waldirio Manhães Pinheiro <<br>
> <a href="mailto:waldirio@gmail.com">waldirio@gmail.com</a>> wrote:<br>
><br>
>> Hello Dewangga and list friends, good morning<br>
>><br>
>> By default the Spacewalk don't have this feature, btw you can do things<br>
>> like bellow:<br>
>><br>
>> 1. Create a rpm just to do what you need, so you configure in conf.<br>
>> channel the package and the command will be executed (I know, I don't like<br>
>> too, but it work).<br>
>><br>
>> 2. Create a script like bellow in /etc/cron.hourly. Sure you will change,<br>
>> remove comments and define to your environment, but this will work too. The<br>
>> command will not be execute at the same time of deploy, but on the next 01<br>
>> minute of next hour.<br>
>><br>
>> ###<br>
>> #!/bin/bash<br>
>> if [ -f /var/log/ref_teste ]; then<br>
>>   echo "Script was defined - $(date)"           | tee -a /var/log/messages<br>
>>   echo "Removing $0 from /etc/cron.hourly"      | tee -a /var/log/messages<br>
>>   echo "### rm -rf /etc/cron.hourly/$0"         | tee -a /var/log/messages<br>
>> else<br>
>>   echo "TEST ### $(date) ###"                   | tee -a /var/log/messages<br>
>>   touch /var/log/ref_teste<br>
>> fi<br>
>> ###<br>
>><br>
>> I'll prepare a real sample and create a post in my blog. Good question! ;-)<br>
>><br>
>> Take Care and let me know if work to you.<br>
>><br>
>> ______________<br>
>> Atenciosamente<br>
>> Waldirio<br>
>> msn: <a href="mailto:waldirio@gmail.com">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><br>
>> 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><br>
>><br>
>> On Thu, Oct 16, 2014 at 12:19 AM, Dewangga Bachrul Alam <<br>
>> <a href="mailto:dewanggaba@xtremenitro.org">dewanggaba@xtremenitro.org</a>> wrote:<br>
>><br>
>>> 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">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>
>>><br>
>><br>
>><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Spacewalk-list mailing list<br>
> <a href="mailto:Spacewalk-list@redhat.com">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>
><br>
<br>
_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com">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>
</div></div></blockquote></div><br></div>