Author Topic: Setting up init script  (Read 2288 times)

Witzman

  • Regular Poster
  • **
  • Posts: 15
    • View Profile
Setting up init script
« on: January 09, 2009, 10:20:31 pm »
I apologize for the IRC history, but it seems, that all informations are included here.

Please help me, if you can....
<Witzman> hi
<Witzman> can anyone help me with an init script which is not working?
<Witzman> i want to execute the flickrfetchr.rb script manually during boot, as it is not working for me putting the command in the orbiter plugin. so i created a shellscript in /etc/init.d
<Witzman> two problems:
<Witzman> 1. syntax of the script. what i have to put in the /etc/init.d/flickr file? currently i have:
<Witzman> #!/bin/bash
<Witzman> flickrfetchr.rb
<Witzman> and thats it
<Witzman> and 2. what i have to do to integrate the script in the boot process?
<Witzman> when running rcconf it says that the script is enabled
<Witzman> so it seems, that it calls the script, but something is wrong in the script
<Witzman> hm,
<Witzman> if i run "sudo /etc/init.d/flickr" the script starts up
is it executable?
<esperegu> hmm. I gues so if you run it manually
<Witzman> it seems so. because it starts, when starting it manually
<esperegu> don't you have to set a start link in the dirs of the different user levels?
<Witzman> maybe
<Witzman> but how? :)
<esperegu> like in /etc/rcX.d/
<esperegu> it's just a simlink
<Witzman> oehm... )
<esperegu> an S starts it a K stops it
<Witzman> i know, waht a symlink is, but not sure how to create one
<esperegu> and the number defines the order
<esperegu> ln -s
<Witzman> i want to have it executed before LinuxMCE starts up
<Witzman> so runlevel 3 or 4 is the right one, isnt it?
<esperegu> ln -s /target /link
<esperegu> not sure which level is default
<Witzman> wait
<Witzman> just saw, that there is a S20flickr file in etc/rc3.d
<Witzman> i already created it last week
<Witzman> but script doesnt start during boot
<Witzman> i checked with ps -auwwx | grep "flickrfetchr.rb"
<Witzman> ups
<Witzman> i checked with ps -auwwx | grep "flickr"
<esperegu> and it has right rights and user etc?
<Witzman> 1.  /etc/init.d/flickr  owner=root  group=root  permissions 755
<Witzman> 1.  /etc/rc3.d/S20flickr  owner=root  group=root  permissions 777
<esperegu> does'nt those script get started with start argument?
<Witzman> no
<Witzman> if i start it manually i dont need arguments and it fetches pics
<Witzman> its controlled via the config file
<esperegu> yeah. but I don't think they called without arguments.
<esperegu> maybe that's u problem
<esperegu> I think it get's the argument start
<Witzman> i can start with --verbose as argument and then i see all the dialoges, its running correct

sudo /etc/init.d/flickr start  starts the service  it fetches the files.

but why the autorun dont works???
« Last Edit: January 09, 2009, 10:35:17 pm by Witzman »

Ladylou17

  • First post!
  • Posts: 1
    • View Profile
Re: Setting up init script
« Reply #1 on: June 10, 2009, 07:12:58 am »
How can I set up init script? Can you explain more about init script? I am not familiar to the word.



________________
filing back taxes