The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

newbie linux help, please by Emanon2003-02-27 14:29:25
  Hmmm "easy" way: by mhiper3 2003-02-27 15:33:45
The /etc/init.d directory has the startup scripts.

You could make a script like this:
#!/bin/bash

if [$# -ne 1 ]
then
echo -e "\n\tSyntax: $0 {start | stop}\n"; exit 1
fi

case "$1" in
start) {{{{{INSERT HERE COMMAND TO START}}}}
;;
stop) {{{{{INSERT HERE COMMAND TO START}}}}
;;
*) echo -e "\n\tSyntax: $0 {start | stop}\n"
;;
esac


exit 0

You'll call this file, let's say, samba and put it in /etc/init.d

Now, go to /etc/rc3.d and make a symbolic link to the file you just created, like this:
cd /etc/rc3.d
ln -s /etc/init.d/samba S99samba

And finally, repeat those links in /etc/rc5.d
cd /etc/rc5.d
ln -s /etc/init.d/samba S99samba

Now, each time you start your system, it should execute the samba daemon

[ Reply ]

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)