ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Anton Farygin <rider@altlinux.com>
To: sisyphus@lists.altlinux.org
Subject: [sisyphus] incron - сделаем жизнь забавнее...
Date: Tue, 26 May 2009 17:30:45 +0400
Message-ID: <gvgr0i$h5k$1@ger.gmane.org> (raw)

Всем привет.

В сизиф отправлена небольшая игрушка, которая позволяет сделать жизнь 
пользователей и системных администраторов намного приятнее и интереснее ;)

Коротко говоря - это аналог cron'а, но задания выполняются по факту 
изменений в файловой системе. При этом события отслеживаются с помощью 
inotify.

apt-get install incron

service incrond start

incrontab -e


Обратите внимание, что структура файла incrontab описана в man 5 
incrontab. И там есть довольно неприятное ограничение - разделителем 
полей может быть только пробел, и никак иначе.
Пример:

/var/ftp/incoming IN_ALL_EVENTS /home/rider/bin/test.sh $@ $%
По любому событию в каталоге /var/ftp/incoming будет запущен 
/home/rider/bin/test.sh, которому в качестве параметров передано имя 
файла и тип операции над ним.

Удачного развлечения.

Rgds,
Rider



             reply	other threads:[~2009-05-26 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 13:30 Anton Farygin [this message]
2009-05-26 14:05 ` Slava Semushin
2009-05-26 16:42   ` Anton Farygin
2009-05-26 14:33 ` Mikhail Efremov
2009-05-26 16:44   ` Anton Farygin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gvgr0i$h5k$1@ger.gmane.org' \
    --to=rider@altlinux.com \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git