[CentOS] Launch many scripts with reboot

Georghy fusco at wanagain.net
Thu Feb 11 11:39:38 UTC 2010


Georghy a écrit :
> Rudi Ahlers a écrit :
>   
>> On Thu, Feb 11, 2010 at 12:13 PM, Georghy <fusco at wanagain.net 
>> <mailto:fusco at wanagain.net>> wrote:
>>
>>     I everyone,
>>     I want to know how can I launch many script with reboot beetween
>>     each script
>>     ie : I launch script1 at start up then the system reboot and launch
>>     script2 then ...
>>     Thanks for all your answers
>>
>>     --
>>     Cordialement, / Greetings,
>>     Georghy FUSCO
>>
>>     _______________________________________________
>>
>> Simple :)
>>
>> 1. Add a line to /etc/rc.local - for exmaple "sh /root/myscript"
>> 2. /root/myscript's contents could look like this: sh /root/runfirst
>> 3. Now, you have say /root/script1, /root/script2, /root/script3, etc. 
>> At the end of each script do this:
>>
>> rm -rf /root/script1
>> echo /root/script2 > /root/runfirst
>>
>>
>>
>>
>>
>>
>> -- 
>> Kind Regards
>> Rudi Ahlers
>> SoftDux
>>
>> Website: http://www.SoftDux.com
>> Technical Blog: http://Blog.SoftDux.com
>> Office: 087 805 9573
>> Cell: 082 554 7532
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>   
>>     
> Thanks for your answer I'll try
>
>   
your command works, but I want to watch the script running, in order to 
view errors, so I figured out that I have to launch the script after the 
user is connected thanks to .bachrc do you know how to do that ?
thanks

-- 
Cordialement, / Greetings,
Georghy FUSCO



More information about the CentOS mailing list