This script is for cPanel users. It only configures services for the user that runs the script.
cpuser_service_manager script adds and removes user-managed and monitored services for your cPanel account. User-managed services are programs that you want your server to run all the time, such as a web application that runs in either tomcat, PSGI, rails, or WSGI, among others. Use this script to manage services run as the user, rather than the
This script also configures the Ubic subsystem on your account, which allows you to easily manage your services, and adds a watchdog cron job to monitor your services.
- You must possess terminal access to use this script and the Ubic subsystem. Your hosting provider controls this access in WHM's Manage Shell Access interface (WHM >> Home >> Account Functions >> Manage Shell Access).
- The Shell Fork Bomb Protection feature will cause the Ubic subsystem to fail to start Tomcat 8.5. Your hosting provider must navigate to WHM's Shell Fork Bomb Protection interface (WHM >> Home >> Security Center >> Shell Fork Bomb Protection) and disable it before you can start Tomcat 8.5.
To use this script, run the following command on the command line:
When you run this script, it will also configure the Ubic subsystem and add a watchdog cronjob if necessary. A watchdog cronjob monitors the status of your services.
/usr/local/cpanel/scripts/cpuser_service_manager script accepts the following arguments, where
service_name represents the name of a service and
path represents a file path:
/usr/local/cpanel/scripts/cpuser_service_manager add my_psgi_app --init-script=/path/to/init.file
/usr/local/cpanel/scripts/cpuser_service_manager add my_psgi_app --ubic-service=/path/to/ubic.file
|Display information about how the script works and what it does.|
|Display a list of the user managed and monitored services.|
|Remove a service.|
Display the abbreviated help information.
/usr/local/cpanel/scripts/cpuser_service_manager hint add
Display the script's help information.
/usr/local/cpanel/scripts/cpuser_service_manager help add
The Ubic subsystem
/scripts/cpuser_service_manager script configures the Ubic subsystem, if necessary, when you add a service to your cPanel account. This subsystem enables easy management of your system's services on the command line. Use this subsystem to stop, start, restart, and see the status of your account's services.
The Ubic subsystem configuration adds the following to your account:
Do not edit the the
~/.ubic.cfgfile or it will not function correctly.
- A cronjob that includes a Ubic watchdog process to monitor the status of your service.
To use the Ubic subsystem, run the following command on the command line:
If ubic does not exist in your PATH, you must add it to your configuration. For example, you might add the following line to your
Jailshell users cannot see the status of their previously started Tomcat service. The default jailshell permissions only allow users to view their current session's processes. If they attempt to restart an already active service with Ubic, the system launches a duplicate process.
You can use the following arguments to manage your services with Ubic, where
service_name represents the name of the service that you wish to modify:
|Display the status of a service.|
|Start a service.|
|Stop a service.|
|Restart a service.|
You can view other possible arguments with the
perldoc /usr/local/cpanel/3rdparty/perl/528/bin/ubic command.