Applies To
Linux Admins managing Zend Server through SystemCTL and not through ZendCTL
Overview
Starting, Stopping, Restarting and checking Status of Zend Server Services on Linux should normally be done by ZendCTL, under /usr/local/zend/bin/zendctl.sh.
Reference for ZendCTL command: https://help.zend.com/zend/current/content/linux_mac__package_setup_and_control_scripts.htm
However, some admins prefer to be using SystemCTL for managing Zend Server service, but it misses the Clean Semaphores script, which runs as soon as Zend Server is stopped.
Requirements
SystemD version should supersede 231, so CentOS 7 will not apply here.
- Verify systemd --version > 231
Note: When called the Clean Semaphores script from the SystemD service hook, below SystemD version 231, you will get a permission error because of insufficient privileges for user zend:
ipcrm: permission denied for id (xxxxx)
Recipe for Clean Semaphores pass through SystemD service hook
- Edit /usr/lib/systemd/system/zend-server.service
- Comment out Clean Semaphore UnComment the ExecStopPost line, and then add a plus sign (+) before the path to the Clean Semaphores commandscript call:
ExecStopPost=+/usr/local/zend/bin/clean_semaphores.sh
- Save and reload SystemD:
systemctl daemon-reload
...
Related articles
Content by Label |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | SUPPORT |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label = "kb-how-to-article" and type = "page" and space = "SUPPORT" |
---|
labels | kb-how-to-article |
---|
|
Result
Once the above line is in place, you can either use ZendCTL or SystemCTL to manage Zend Server service, without losing the Semaphore cleanup script flow.
...
...