0
Beantwortet

servicebar and services

Benjamin Khoo vor 10 Jahren aktualisiert von Eugene Pankov (Project coordinator) vor 10 Jahren 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

Antwort

Antwort
Beantwortet
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.
Antwort
Beantwortet
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.
ah... that great. thanks