I am using CentOS 6.3, I failed to add a script in inittab to let it start automatically.
myscriptid:2345:respawn:myscript_path
In the script, I have a su myusername -c command, if I run it directly, it prompts me to enter the password, then the script can run. So my question is if I add it to inittab, will it be called successfully?
The daemontools package adds this line to inittab so that svscan will *always* be running:
SV:123456:respawn:/command/svscanboot
I've used this with earlier versions of Fedora with great success. Since inittab is no longer used, where should I start the script from?
Any thoughts are much appreciated.
Paul
How do I start an application automatically after login?
I have just installed Fedora 15 on my laptop. I want to study /etc/inittab as I studied it in RedHat 9.
I don't see any script in /etc/inittab. Also , the way the default runlevel can be changed in inittab has changed in Fedora 15.
If there is a good tutorial to study the changes in Fedora 15? I found https://fedoraproject.org/wiki/Systemd, but was not much useful.
Hi, I was an happy LXDM user until the latest update, LXDM 0.4.1-11.
I have the following entry in my /etc/inittab (on OpenSuse 12.1):
gp:2345:respawn:/usr/local/gpm/bin/gpsrvd
Which won't execute no matter what I try to do.
comment it out
run init q
uncomment it
run init q again
Still it wont run!
I then run it manually as root:
lorraine:/home/joseph # /usr/local/gpm/bin/gpsrvd &
[1] 5646
and it runs :
lorraine:/home/joseph # ps aux | grep gpsr
roo
I'm running Ubuntu Linux. Suppose there is a program called myprogram. This program prompts the user for input; specifically, the user must type an integer when prompted and press Enter. I would like to automate this process using a bash script. In particular, I would like to execute myprogram, say, 100 times (using a counter i which goes from 1 to 100).
Allan McRae wrote:
I have a script that runs on startup, but it wont launch a application in chroot.
#!/bin/sh
/usr/sbin/chroot /root/chrootdir/ /bin/sh -c "lighttpd -f /etc/lighttpd.conf -m /lib"
echo "script activated" >> /log/www.log
the log file is written/appended on startup, but the lighttpd server is not starting.
Running the script when the box is running works fine and launches lighttpd.