forked from sipXcom/sipxecs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UC-647 Improve init scripts http://track.sipfoundry.org/browse/UC-647
- output of scripts ends with a newline - when stop is called processes are now killed by name - to see if a process was launched successfully we : -look for the pid of the new spawned process in the process table for a maximum amount of time -check to see if the process is listening on a port (netstat is used) - before printing echo_succsess or echo_failure return codes are analyzed Added 4 new functions in the sipx-utils.sh.in file - checkRunningInstance - returns 0 if processes related with a regex and belonging to a user are found in the process table - return1 1 otherwise - checkRunningInstanceTimeout - similar to checkRunningInstance - searches if process exists for a maximum amount of time by checking the process table periodically -checkIfListening - using netstat check if the process related with the regex is listening on any port - killAnyOrphans - in a loop search for processes that are related with a specified regex and belong to a specified user and kill them modifications made to functions: - start () - no fork : - kill all related processes (killAnyOrphans) - launch process - daemon : - check to see if there is another instance of the process running (checkRunningInstance);if there is one exit with failure else launch process - check if process was launched (checkRunningInstanceTimeout) - check if listening on a port (checkIfListening) - stop () - kill all related processes instead of killing by the pids found in the pidfile - status - search for all related processes - for the java related scripts to see if the process is running the process table is checked - condrestart - check in the process table if there is another instance of the same process running before restarting
- Loading branch information
LaurentiuGhita
committed
Aug 13, 2013
1 parent
d74d848
commit bd62ae4
Showing
20 changed files
with
909 additions
and
580 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.