Koozali.org: home of the SME Server

Start/Stop service from command line

haj

Start/Stop service from command line
« on: November 11, 2005, 01:54:16 AM »
Hello,

I want to start/stop a service using a perl script:

Code: [Select]
#!/usr/bin/perl -w

my $res = /etc/init.d/mldonkey start;
print $res;


Simple isn't it? But I get an error when ran thrown apache (http-admin):

Starting Mldonkey-server: standard in must be a tty [ FAILED ]

May some one help me??

Best regards

--
Laurent

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Start/Stop service from command line
« Reply #1 on: November 17, 2005, 01:47:08 PM »
Quote from: "haj"
Hello,

I want to start/stop a service using a perl script:

Code: [Select]
#!/usr/bin/perl -w

my $res = /etc/init.d/mldonkey start;
print $res;


Simple isn't it? But I get an error when ran thrown apache (http-admin):

Starting Mldonkey-server: standard in must be a tty [ FAILED ]

May some one help me??


This is an issue with Mldonkey-server - you should perhaps ask in an Mldonkey forum. Maybe they can tell you why Mldonkey-server expects stdin to be a tty.

haj

Re: Start/Stop service from command line
« Reply #2 on: November 17, 2005, 10:53:59 PM »
Quote from: "CharlieBrady"

This is an issue with Mldonkey-server - you should perhaps ask in an Mldonkey forum. Maybe they can tell you why Mldonkey-server expects stdin to be a tty.


Thanks Charlie