LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Perl Scripts at startup? Suse 9.3 (https://www.linuxquestions.org/questions/linux-newbie-8/perl-scripts-at-startup-suse-9-3-a-349703/)

Drfarfrompuken 08-03-2005 03:58 PM

Perl Scripts at startup? Suse 9.3
 
Ok this maybe a stupid question but maybe the only stupid question is the one not asked!

I am trying to run Slimserver on a recently installed SUSE 9.3 box and the only way I can get it working is to run the Slimserver.pl manually but I would really like to be able to set it up so that the 'slimserver.pl --daemon' is started when the computer loads up as I will not always be there when the computer is restarted.

Ive looked into startup scripts something to do with init.d I think but the only Linux experience I have is through using computers in Uni.

Any help would be greatly appreciated.

Thanks

oot 08-03-2005 06:37 PM

OK... create a file called "/etc/rc.d/rc.slimserver"

Put the following in it:
#!/bin/bash
/path/to/slimserver.pl -daemon

Then, run "chmod 700 /etc/rc.d/rc.slimserver", and you're all set.

Drfarfrompuken 08-04-2005 04:51 AM

oot,

thanks for the reply, however despite this the script is not running at startup, I can run the script manually to start the slimserver so I know the script is correct.

alienDog 08-04-2005 06:45 AM

You could simply place your "/path/to/slimserver.pl -daemon" in rc.local.

ghight 08-04-2005 09:38 AM

Drfarfrompuken, you'll need to translate this into SuSE. The posts are on the write track, but Slack and Suse startup is different.

alienDog 08-04-2005 02:06 PM

They differ (Slackware's BSD style vs. Suse's SysV style), that's true, but surely there is rc.local in suse also? It's location is another question...

it will be in one of the following directories:

/etc/
/etc/rc.d/
/etc/init.d/
/etc/rc.d/init.d/

Some of the above directories might be symlinks to some others, that's the way some distros are built. I don't really have any experience with suse, and in fact I've only taken a brief look at it's startup scripts on a friend's computer. Since it looked like a total mess to me, I can't be of any help with which one of the above is the correct one.

ghight 08-04-2005 03:15 PM

/etc/init.d/boot.local

Read /sbin/init.d.README. It's a good primer on the SuSE startup. It is a little convoluted, but its to LSB standards.

Drfarfrompuken 08-05-2005 07:41 AM

Thanks for all your help,

Through browsing many a forum with regards to Suse it seems that it does a number of things differently to other distros. The only reason I got suse was because there were some spare copies floating around uni, perhaps if I tried a more 'compliant' distro, maybe Mandrake? It would be easier for me to learn the ropes, as this is afterall, the whole point of the exercise.

ghight 08-05-2005 08:12 AM

Quote:

Originally posted by Drfarfrompuken
Thanks for all your help,

Through browsing many a forum with regards to Suse it seems that it does a number of things differently to other distros. The only reason I got suse was because there were some spare copies floating around uni, perhaps if I tried a more 'compliant' distro, maybe Mandrake? It would be easier for me to learn the ropes, as this is afterall, the whole point of the exercise.

The irony is that SuSE is to the Linux Standards Base standard. The more popular distros AREN'T to any defined standard. The whole Linux Standard things doesn't seem to be taking off very well although it's not real hard to see why. Personally, I think Slackware startup makes the most sense, but other than being unintuitive, the SuSE scripts are very well documented so it isn't too difficult to scan the filesystem to find the information that you need.


All times are GMT -5. The time now is 09:34 AM.