0
Є відповідь

servicebar and services

Benjamin Khoo 10 років тому оновлено Eugene Pankov (Project coordinator) 10 років тому 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.