UnixDaemonReloader

command
v0.0.0-...-e8c5f5c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2016 License: GPL-2.0, GPL-2.0, GPL-2.0 Imports: 13 Imported by: 0

README

UnixDaemonReloader

ENG:
  • Automatic restart unix-demons when the configuration files are modified.
  • Execution any commands when changing specified files.
RUS:
  • Автоматическая перезагрузка unix-демонов при изменении конфигурационного файла.
  • Выполнение любых команд при изменении указанных файлов.
Default install folder: /server/SSS/UnixDaemonReloader

Configuration file syntax:

  • Шелл, и ключ к нему, для запуска внешних команд в таком виде: /bin/sh -c "ps ax"
  • Path to Unix shell and the parameter allows you to execute an external command, like so: /bin/sh -c "ps ax"
"UDR_Shell": "/bin/sh",
"UDR_ShellExecParam": "-c",
  • в виде списка задаем строки с отслеживаемыми файлами и каталогами
["/каталог", "файл", "действие", "предварительное действие", "результат предварительного действия","скрипт ошибки предварительного действия"],
["/каталог", "маска*файла*", "действие", "", "",""],
["/каталог", "!все*файлы*кроме*этого,!кроме*этого,!и*кроме*этого", "действие"]
  • specify a list of strings to track files and directories
["/directory", "file", "action", "pre-app script", "result of pre-app script","error script"],
["/directory", "mask*of*the*files*", "action", "", "",""],
["/directory", "!all*files*except*this,!except*this,!and*except*this", "action"]
"UDR_WatchList": [
["/etc/postfix", "main.cf", "/etc/init.d/postfix reload","postfixCheck.sh","OK","postfixError.sh"],
["/etc/postfix", "master.cf", "/etc/init.d/postfix reload","postfixCheck.sh","OK","postfixError.sh"],
["/etc/amavis/conf.d", "*", "/etc/init.d/amavis restart","","",""],
["/etc/spamassassin", "local.cf", "/etc/init.d/spamassassin reload","","",""],
["/etc","iptables.conf","/server/scripts/iptables/rest.sh"]
],
  • путь до папки со скриптами предварительной проверки.
  • path to "pre-app" scripts.
"UDR_ScriptsPath": "/server/SSS/UnixDaemonReloader/CheckScripts",
  • количество попыток исполнения файла проверки конфигурации.
  • Number of attempts to try execute "pre-app" scripts.
"UDR_PreAppAttempt": 10,
  • пауза в секундах перед запуском скрипта. Этот параметр сделан для того, что бы если вы вдруг случайно во время редактирования конфига сохранили файл "недоделанным", то у вас было время на исправление ошибки до перезапуска демона.
  • pause before running the script (seconds). This setting for save your daemons from "your hands". If you during editing configuration file, accidentally press "save a file" with error or unfinished, then you have time to correct the error before the daemon will be restarted.
"UDR_PauseBefore": 600,
  • сколько спать между циклами проверки конфигов
  • How much time to sleep between checks files
"Sleep_Time": 60,
  • путь к базе SQLite, в которой хранятся контрольные суммы файлов
  • SQLite_DB - the way to the base SQLite, which stores the checksums of files
"SQLite_DB": "/server/SSS/UnixDaemonReloader/UnixDaemonReloader.sqlite",
  • PID, LOG and LOG Level :)
"PID_File": "/var/run/SSS/UnixDaemonReloader.pid",
"LOG_File": "/var/log/SSS/UnixDaemonReloader.log",
"LOG_Level": 0

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL