Koozali.org: home of the SME Server

How to - service: command not found

Offline ankura

  • 3
  • +0/-0
How to - service: command not found
« on: February 12, 2008, 02:02:13 PM »
Hi,

I'm relative new to linux and SME Server.  I currently run a SME server 7.3.  It is a clean install, fresh from the iso.  The server is setup as a server - gateway server.  now my question:

We want to keep track of Internet usage in a Internet cafe.  It has to log the bandwidth and charge the user for it before hand. The same with printing.  So we decided to use the papercut.com program. It came as an sh istall script.  It install very well. The program is starting up after install, and we can config it trough there web interface.  But after the reboot the program does not start.  If i try to start it manually in init.d it says "-bash papercut: command not found".  This command is run as root.

What could the problem be?

Please any help would be appreciated.

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: How to - service: command not found
« Reply #1 on: February 13, 2008, 07:19:28 AM »
If i try to start it manually in init.d it says "-bash papercut: command not found".
What exactly is the command you typed that gave you that error?  Linux won't let you run a command under the current directory (like windows does), you have to give the entire path like this:

/etc/init.d/papercut

or like this from within the program's current directory:

./papercut

SME runs under run level 7 and this is different that most Linux distros.  To make it start upon each boot up, you will probably need to link to rc7.d.  Let's see if we can determine how the .sh script installed everything, show the output of:

ls /etc/init.d/paper*

and

ls /etc/rc5.d/*paper*
In life, you must either "Push, Pull or Get out of the way!"

Offline ankura

  • 3
  • +0/-0
Re: How to - service: command not found
« Reply #2 on: February 13, 2008, 06:23:38 PM »
Thank you pfloor,

I've copy the papercut symbolic links from /etc/rc5.d to /etc/rd7.d and it boot.
My question is must i do the config setprop papercut start enable or can i leave it like it is?
Basically is there anything else i have to do, to get it SME server compliant?

Thank You

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: How to - service: command not found
« Reply #3 on: February 13, 2008, 06:55:41 PM »
Thank you pfloor,

I've copy the papercut symbolic links from /etc/rc5.d to /etc/rd7.d and it boot.
My question is must i do the config setprop papercut start enable or can i leave it like it is?
Basically is there anything else i have to do, to get it SME server compliant?

Thank You
Probably nothing else needed.  config setprop papercut start enable (actually it is "status enabled" not "start enable") would be needed if the service was supervised (or you made it supervised) OR you modify papercut to read the config db.

This is quite technical to get into here in the forums so if you are interested in the specifics of supervised services and/or how to use the db settings, I suggest you read (probably at least 3 times) the developer's manual here:

http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/gordonr/devguide/html/devguide.html
In life, you must either "Push, Pull or Get out of the way!"

Offline ankura

  • 3
  • +0/-0
Re: How to - service: command not found
« Reply #4 on: February 13, 2008, 07:06:42 PM »
Thank you for your help.


Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: How to - service: command not found
« Reply #5 on: February 13, 2008, 07:15:09 PM »
Thank you pfloor,

I've copy the papercut symbolic links from /etc/rc5.d to /etc/rd7.d and it boot.
My question is must i do the config setprop papercut start enable or can i leave it like it is?
Basically is there anything else i have to do, to get it SME server compliant?

Thank You

Hi

you can create a symbolic link in rc7.d with
Code: [Select]
ln -s /etc/rc.d/init.d/e-smith-service S99papercut

and then, with
Code: [Select]
config set papercut service status enabled

you can "templatize" the status at boot time..

if you wish papercut not to start at boot time without removing it, a simple
Code: [Select]
config setprop papercut status disabled

will do the work

HTH
Ciao

Stefano