hi everyone...
we have to run any python file e.g. show.py at startup..i.e. when OS starts it runs automatically.
we are proceeding this way,
writing a startup script named forfyp2 ,pasting it in init.d , making it exe using chmod , creating startup links using update-rc.d forfyp2 defaults. After this i think i should run at stratup automatically, but it is not ..please tell if any errors r there..thank you.
code is here...
Your script is barely readable (because of the format, so you probably might already be doing, what I have suggested below)
On most unix flavors there are certain rules for init.d scripts.
One of the biggest one is that these scripts should respond to "start" and "stop" as the first argument.
also look into your syslog (typically /var/log/syslog). That should show if there are any errors.
Also replace the #! line in your script with
Code:
!# /bin/sh -x
The -x will show a line by line execution in the syslog. (Dont forget to remove the -x once your issue is resolved)
Hope these few tips help.
Last edited by linuxpenguin; 02-16-2010 at 07:05 PM..
Reason: formatting
HI,
I am trying to implement a simple shell script program that does not make use of ls or find commands as they are quite expensive on very large sets of files. So, I am trying to generate the file list myself. What I am trying to do is this:
1. Generate a file name using shell script, for... (2 Replies)
We have a Windows Service written in C# ported over to linux using Mono Develop... The code is working 100% when we run a script file which runs the exe... but we want the application to run at startup.... The application gathers info of the computer eg. Hard Disk Space etc... And compress it into... (1 Reply)
Run script with different user at the startup ..
I have created this user appuser
And I have a script should to be up thru the startup by this user appuser
I have defined the path of the script /user/appstart.sh in /etc/rc
But at the startup starting will be by root , I’d like to keep... (6 Replies)
Hi
I have a script myscript.sh that needs to be run whenever the server boots. The script is actually logging Syslog-ng messages to sql server. I need to lauch it at startup
I have copied the script in etc/init.d
i have also added the link
ln -s /etc/init.d/syslog-ng-mssql-pipe.sh... (5 Replies)
hi.
i need to start a shellscript AFTER full system startup
the script will then run permanently in a loop checking the server every minute and in case of major hangs it just reboots the machine.
i put it into /etc/rc.local file like this:
#!/bin/sh -e
#
# rc.local
#
# This script is... (4 Replies)
hi,
i am using rhel 5, and i wanna run a script as soon as the operating system open. How can i do this ? ( i was reading rc.d files but i could not understand exactly what are the run levels and where should i put the my shell script.
my script will be :
#!/bin/ksh
iptables -I INPUT... (1 Reply)
Hi guys ,
I Need to run a specific command (pinging a particular machine).
Which need to run every time i reboot the server till the time it shut down.
What is the preferred way of doing this.
Will it impact my system performance.
My Operating system is as below.
# lsb_release -a... (3 Replies)
I am using AIX 5.3 in P6 machine.
I have a script "test.sh", when i run it manually it runs properly.
I want to run the script automatically when system starts.
I kept the script in /etc/rc.d/init.d and also in /etc/rc.d/rc2.d but it is not working.
Do i have to write it in inittab instead of... (1 Reply)
Hi all,
i have a script in /etc/init.d directory.
-rwxr-xr-x 1 root root 26 Mar 28 16:00 myscript
I need it to run when my linux reboots/startup. However is it not being executed. Do i need to put in in the rc.local directory? (1 Reply)