0
Отвечен

servicebar and services

Benjamin Khoo 8 лет назад обновлен Eugene Pankov (Project coordinator) 8 лет назад 1
hi

i am trying to make a simple plugin to start/stop my own service. However, the servicebar doesn't seem to be able to change to stop/restart button when i click on start. Even though the service is actually started. how does this work? 

i have my own init script written as a standard sysvinit style script but servicebar just can't seem to pick it up and control it. any advice?

thanks

Ответ

Ответ
Отвечен
Service bar picks service status directly from Services plugin. Depending on OS, your script must be compatible with Upstart (Debian-based) or SysV-init (Debian and RHEL).
As I guess you probably have written your script in SysV-init style, service status is detected by checking exitcode when calling /etc/init.d/xxx status.
Exitcode 0 means running, other codes mean stopped.
Ответ
Отвечен
Service bar picks service status directly from Services plugin. Depending on OS, your script must be compatible with Upstart (Debian-based) or SysV-init (Debian and RHEL).
As I guess you probably have written your script in SysV-init style, service status is detected by checking exitcode when calling /etc/init.d/xxx status.
Exitcode 0 means running, other codes mean stopped.

Сервис поддержки клиентов работает на платформе UserEcho