Run at boot

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Run at boot
# 8  
Old 01-28-2011
Ah...the header info isnt quite right.
Compare them against one of the existing services that are in /etc/init.d
Make sure the name of the script and the "Provides" line is also correct.
An example of my OpenSuSE headers are:
# Provides: XXX
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: Start the XXX daemon

then once your happy re-run "insserv" until the messages disappear.

This User Gave Thanks to citaylor For This Post:
# 9  
Old 01-28-2011
Thnx, this is weird. It seems to work, but trac will not start. I added this line in /etc/init.d/trac:
echo "test" > /testlog

After system reboot, the file (/testlog) exists. So /etc/init.d/trac is called. But I can't reach the Trac page! (When I do a "/etc/init.d/trac start" now, I can reach Trac). So something is wrong. Maybe it needs Apache to be started or something? How can I do this?

---------- Post updated at 09:38 AM ---------- Previous update was at 08:59 AM ----------

Thanks!!! Smilie It works now! I modified the script again:
#! /bin/sh
# Provides:          tracd
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts the tracd web server
# Description:       starts tracd using start-stop-daemon
DAEMON_OPTS="-p 30 --auth="*",/project/passwd,trac -e /project --daemonize"
test -x $DAEMON || exit 0
# Include tracd defaults if available
if [ -f /etc/default/tracd ] ; then
        . /etc/default/tracd
set -e
case "$1" in
        echo -n "Starting $DESC: "
        /usr/local/bin/tracd $DAEMON_OPTS
        echo "$NAME."
        echo -n "Stopping $DESC: "
        killall tracd
        echo "$NAME."
        echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
        exit 1
exit 0

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Change run level at boot

for solaris 11, how does one change the run level at boot from 3 to 2? i checked "/etc/inittab" file where i usually change it in other *nix but it seems solaris is not using it. (1 Reply)
Discussion started by: badbanana
1 Replies

2. UNIX for Dummies Questions & Answers

Boot vs run

Hello! Please, what ELSE do we BOOT except of operating systems? Can someone list me at least some programs which we boot and are not OSs? Many thanks¨! (1 Reply)
Discussion started by: pinklemon
1 Replies

3. UNIX for Advanced & Expert Users

has no rc.local in /etc, how to auto run cmd in the boot process?

Hi I want to run some cmd before the linux boot up and I want to let it run before sshd service start, any helps? (1 Reply)
Discussion started by: yanglei_fage
1 Replies

4. UNIX for Dummies Questions & Answers

How to run linux in windows 7 without dual boot?

tell me in steps if its virtual box (2 Replies)
Discussion started by: mahor1989
2 Replies

5. Solaris

Solaris x86 installation using jumpstart does not local boot ( boot from hdd)

I am trying to install Solaris x86 using the Jumpstart server. I run the add_install_client command with appropriate options, and reboot my x86 Target box. The installation starts fine and unattended. After the installation completes and the target goes for a re-boot, it does not boot from the HDD... (9 Replies)
Discussion started by: hemalsid
9 Replies

6. Boot Loaders

Reboot and Select Proper Boot device or insert Boot media in select Boot device and press a key

Hello, I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error " reboot and select proper Boot device or insert Boot media in select Boot device and press a key " I have tried CD and... (0 Replies)
Discussion started by: rpf
0 Replies

7. Debian

Grub2 (dual boot, dmraid) cannot run Debian6

Hello, firstly excuse for my poor english. I have a busybox error when I try to run Debian 6. It's like Grub cannot find root (initramfs) My system is: - RAID0 with dmraid - /boot ext2 (from moonOS installation --ubuntu based--) - ext4 (moonOS wich have the Grub2 installation, where I... (0 Replies)
Discussion started by: neutralTTY
0 Replies

8. Solaris

solaris boot problem boot error loading interpreter(misc/krtld)

When I installed the SOLARIS 10 OS first time, the desktop would not start up, this was because of network setup. Reinstalled worked. After a week due to some problem I had to reinstall OS, installation went fine and but when i reboot I get this error. cannot find mis/krtld boot error loading... (0 Replies)
Discussion started by: johncy_j
0 Replies

9. UNIX for Advanced & Expert Users

Cannot boot - Boot : Panic : File size out of range (EWS-UX/V unix)

Hey ! I am running EWS-UX/V (Rel 4.2) on NEC EWS/4800/330 station and I am having problems rebooting my station : I am getting the following message on display : BOOT : PANIC : File size out of range. According to user guide, this error is occuring when a file exceeding the limit and/or... (2 Replies)
Discussion started by: fredo
2 Replies
Login or Register to Ask a Question

Featured Tech Videos