- Download this repository
cd ci-demon
- Run
python setup.py install
. It will installci-demon
package (and some dependencies) to your system, and it will be accessible from command line - Check
pip list -l
. You should see something like thatPackage Version ------------------------- ------- ci-demon 0.1.0
- execute
ci-demon <path_to_configuration_file>
See configuration file for more details
ci-demon application service accept one necessary argument: configuration file
- accept only json format
- all keys should be in upper case
{
"AUTH": {
"TOKEN": "secret-token"
},
"TRANSLITERATE_BOT": {
"TG_TOKEN": "1111:1xXx1",
"BOT_FOLDER": "/path/to/main/executable/file",
"MAIN_EXECUTABLE_FILE": "bot"
}
}
- AUTH
- TOKEN - token to authorize http requests [necessary]
- TRANSLITERATE_BOT - settings to start the 'transliterate' bot
- TG_TOKEN - unique telegram token
- BOT_FOLDER - absolute path to MAIN_EXECUTABLE_FILE
- MAIN_EXECUTABLE_FILE - main executable file
To remove ci-demon
just write: pip uninstall ci-demon
To add ci-demon
as a system service, do the following steps:
$ cd ci-demon
$ sudo cp ci-demon.service /etc/systemd/system/ci-demon.service
$ sudo systemctl daemon-reload
$ sudo systemctl enable ci-demon.service
$ sudo systemctl start ci-demon.service
# check the status
$ sudo systemctl status ci-demon.service
To remove ci-demon
:
$ cd ~
$ sudo systemctl disable ci-demon.service
$ rm /etc/systemd/system/ci-demon.service
$ sudo systemctl daemon-reload