This repository will help you to install/uninstall cube as a system services on a linux machine using System V init scripts.
By using this installer you will be able to start/stop the cube collector and the cube evaluator as services:
sudo service cube-collector start|stop|restart
sudo service cube-evaluator start|stop|restartThe installer assumes you've already installed node.js, npm and mongo and that your node prefix is /usr (however you can specify a different one if needed).
Just clone the repository with
git clone https://github.com/lmammino/cube-daemons.gitThen run
sudo cube-daemons/install.shand it will do all the hard work for you.
The hard work means:
- Install cube as global package
- Creates a dedicate
cubeuser that will be used to run the daemons - Copies configuration files
- Copies the daemons start/stop file
- Adds init scripts to start the daemons
- Starts the daemons
You can customize the installation process by passing few options to the install script:
-hor--help: Display the help-nor--no-cube: Avoid installing cube (useful if you already installed it)-por--node-prefix=VALUE: specify a custom node prefix (default "/usr")-cor--collector-config=VALUE: specify a custom config file for the collector (default "config/collector-config.js")-eor--evaluator-config=VALUE: specify a custom config file for the evaluator (default "config/evaluator-config.js")
By default the installer will copy the configuration files from the config folder. If needed to provide different configuration files, you can customize them befor launching the installer or provide custom configuration files by using the --collector-config and --evaluator-config options.
Note that the files will not be copied if you use the --no-cube option.
Just run
sudo cube-daemons/uninstall.shTo clean up everything that has been installed previously
This code is distributed under the MIT license. Please refer to the LICENSE file to read the full version.
Contributions are always (and really) appreciated 😉