From 4a002e0d8b35de459be28b2543038d99fff424e8 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Mon, 23 Dec 2013 23:09:51 +0400 Subject: [PATCH] Added mans, edited readme --- README.md | 12 +++---- create_archive.sh | 4 +-- sources/queued.1 | 76 +++++++++++++++++++++++++++++++++++++++++++ sources/queued.conf.5 | 44 +++++++++++++++++++++++++ 4 files changed, 128 insertions(+), 8 deletions(-) create mode 100644 sources/queued.1 create mode 100644 sources/queued.conf.5 diff --git a/README.md b/README.md index 667aff5..bd2867a 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,10 @@ Daemon for starting jobs to queue of calculations. To start deamon just run `sys help message ------------ - queued [ -jd | --jobdir /var/lib/queued/job ] [ --priority 0 ] [ -q | --queuefile /var/lib/queued/queue ] [ -u | --user root ] [ -wd | --workdir /var/lib/queued/work ] [-v | --version ] [ -h | --help ] + queued [ -c /etc/queued.conf ] [ -v | --version ] [ -h | --help ] Parametrs: - -jd --jobdir PATH - path to job directory. Default is '/var/lib/queued/job' - --priority NUM - defalut priority. Default is '0' - -q --queuefile PATH - path to queue file. Default is '/var/lib/queued/queue' - -u --user USERNAME - start jobs by user. Default is 'root' - -wd --workdir PATH - path to work directory. Default is '/var/lib/queued/work' + -c PATH - path to configuration file. Default is `/etc/queued.conf` -v --version - show version and exit -h --help - show this help and exit @@ -29,6 +25,10 @@ How-to run jobs * create user file (`script.sh.user`) with the job username if it is needed * copy files to `$WORKDIR` +See also +-------- + man 1 queued + man 5 queued.conf Instruction =========== diff --git a/create_archive.sh b/create_archive.sh index 05f69cc..26b0524 100755 --- a/create_archive.sh +++ b/create_archive.sh @@ -10,8 +10,8 @@ mkdir -p ${ARCHIVE}/etc cp sources/queued ${ARCHIVE}/usr/bin/ cp sources/queued.service ${ARCHIVE}/usr/lib/systemd/system/ cp sources/queued.conf ${ARCHIVE}/etc/ -#cp sources/*.1 ${ARCHIVE}/usr/share/man/man1/ -#cp sources/*.5 ${ARCHIVE}/usr/share/man/man5/ +cp sources/*.1 ${ARCHIVE}/usr/share/man/man1/ +cp sources/*.5 ${ARCHIVE}/usr/share/man/man5/ cp install.sh ${ARCHIVE}/ cp {AUTHORS,COPYING} ${ARCHIVE}/ diff --git a/sources/queued.1 b/sources/queued.1 new file mode 100644 index 0000000..0bcb468 --- /dev/null +++ b/sources/queued.1 @@ -0,0 +1,76 @@ +.TH queued 1 "December 24, 2013" "version 1.1.0" "USER COMMANDS" +.SH NAME +queued - daemon for starting jobs to queue of calculations +.SH SYNOPSIS +.B queued +[ -c /etc/queued.conf ] [ -v | --version ] [ -h | --help ] +.SH DESCRIPTION +.B queued +is a simple daemon written on BASH for starting jobs to queue of calculations in the background. +.SH OPTIONS +.TP +-c /etc/queued.conf +Full path to configuration file. Default is '/etc/queued.conf'. +.TP +-h, --help +Show help and exit. +.TP +-v, --version +Show version and exit. +.SH FILES +.TP +/usr/lib/systemd/system/queued.service +Systemd service file. +.TP +/etc/queued.conf +Configuration file. +.SH EXAMPLES +.TP +# systemctl start queued.service +Start daemon with parameters that are described in configuration file. +.TP +# systemctl enable queued.service +Enable daemon autostart. +.SH USAGE WITH SYSTEMD +If you need change path to configuration file, copy standart service file to /etc directory: +.PP +.nf +# cp /usr/lib/systemd/system/queued.service /etc/systemd/system/queued-my-profile.service +.fi +.PP +Then replace path to configuration file to your option. For example, +.PP +.B from: +.nf +ExecStart=/usr/bin/queued +.fi +.B to +.nf +ExecStart=/usr/bin/queued -c /path/to/new/queued.conf +.fi +.PP +Copy configuration file and edit it: +.PP +.nf +# cp /etc/queued.conf /path/to/new/queued.conf +# $EDITOR /path/to/new/queued.conf +.fi +.PP +Then start service: +.PP +.nf +# systemctl start queued-my-profile.service +.fi +.SH ERRORS +Use +.B journalctl +to determine errors: +.nf + [II] - information string + [WW] - warning + [EE] - error +.fi +.SH SEE ALSO +.BR queued.conf (5) +.SH AUTHOR +Evgeniy Alexeev aka arcanis <\fIesalexeev@gmail.com\fR> diff --git a/sources/queued.conf.5 b/sources/queued.conf.5 new file mode 100644 index 0000000..2ddd8ec --- /dev/null +++ b/sources/queued.conf.5 @@ -0,0 +1,44 @@ +.TH queued.conf 5 +.SH NAME +queued.conf - queued configuration file +.SH SYNOPSIS +/etc/queued.conf +.SH DESCRIPTION +This file configures various parameters of +.BR queued (1). +.SH OPTIONS +.TP +.I WORKDIR= +Full path to directory with source jobs. Default is +.B /var/lib/queued/work. +This directory must contain source scripts +.B script-name +, a priority file (it is not necessary) +.B script-name.pr +and a file with username (it is not necessary too) +.B script-name.user. +.TP +.I JOBDIR= +Full path to directory with running jobs. Default is +.B /var/lib/queued/job. +All job files will be moved here. +.TP +.I QUEUEFILE= +Full path to file with queue list. Default is +.B /var/lib/queued/queue. +.TP +.I PRIORITY= +Default priority. Default is +.B 0. +The higher the value, the higher the priority of the task +.TP +.I SLEEPTIME= +Time interval in minutes. Default is +.B 5. +.TP +.I STARTASUSER= +Default user. Default is +.B root. +This user will own created files. +.SH SEE ALSO +.BR queued (1)