to run a script immediately after restart


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting to run a script immediately after restart
# 1  
Old 09-02-2011
to run a script immediately after restart

Hi i want to run my shell script "script.sh" whenever the system restarts. I am using Solaris 10. Please help.

Thanks.
# 2  
Old 09-02-2011
This User Gave Thanks to itkamaraj For This Post:
# 3  
Old 09-02-2011
Rule #5:
Quote:
(5) Search the forums database with your keywords before asking.
This User Gave Thanks to pludi For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

2. Shell Programming and Scripting

Expect Script - Variables are Empty immediately after "Setting" Them?

Hello All, I have embedded some expect code inside a Bash script I'm writing, but for some reason any variable I 'set' to something is showing as empty immediately on the next line... I haven't run into this problem before so I'm not sure what it could be...? I'm guessing it has something to... (4 Replies)
Discussion started by: mrm5102
4 Replies

3. Shell Programming and Scripting

Script to restart a process

I have written a script which checks for a file if that is being updated or not. If the files is not being updated then it will restart the process. #!/bin/sh DATE=`date +%Y%m%d%H%M%S` LOG_FILE=/var/xmp/log/XMP_* INCEPT=`ls -l $LOG_FILE |awk '{print $5}'` PROC=`xms show pr |grep -i... (3 Replies)
Discussion started by: Siddheshk
3 Replies

4. AIX

Getting size of all the luns immediately via script

Hi I know that to see the size of the lun I need to give the command as "bootinfo -s hdisk*" Can any one assist me with a script which if run will get the size of all the luns allocated to the server. The output of the script should be something like the one below : hdisk0 size = 24GB... (2 Replies)
Discussion started by: samsungsamsung
2 Replies

5. Shell Programming and Scripting

Modifying the Restart Script

Hello, I have a shell script which calls for an existing script with appropriate parameters. It looks something like this. -------------------------------------------------------------------------- #!/bin/bash sh /root/ams_rc stop_shepherd > /dev/null sleep 30 sh /root/ams_rc... (9 Replies)
Discussion started by: Siddheshk
9 Replies

6. Shell Programming and Scripting

'script' command exits immediately

I'm trying to capture the output of some commands with the 'script' utility. Normally, I would type 'script /path/to/output/file', then enter commands, then hit ctrl+D to end the 'script' capture. I'm having trouble with it on a server. Upon starting 'script', it exits immediately before I type... (6 Replies)
Discussion started by: jalburger
6 Replies

7. Shell Programming and Scripting

How to restart a script?

Hello, I created a shell script in /etc/init.d and it already runs at boot. However I cannot figure out how to make it run just like typing "scrip_name start" I can run it like this ./script_name but since I am doing remote log in whenever I log off the script stops and I also don't want to run... (8 Replies)
Discussion started by: kizofilax
8 Replies

8. Shell Programming and Scripting

Any Restart Script?

Hi, I would like to check if there's any sample of restart script for my AIX server. I'm planning to restart it every month. Thanks. (5 Replies)
Discussion started by: ademah
5 Replies

9. UNIX for Dummies Questions & Answers

Restart Script

Hi, I am writing a script and need to goto the start of the script if an incorrect command is wrongly entered what can i do. Andy (1 Reply)
Discussion started by: chapmana
1 Replies
Login or Register to Ask a Question