upstart-file-bridge


SYNOPSIS
       upstart-file-bridge [OPTIONS]...

DESCRIPTION
       upstart-file-bridge  receives information about kernel file events that
       inotify(7) has received and creates init(8) events for them.

       Supported events exposed to Upstart allow jobs to detect creation, mod-
       ification and deletion. See file-event(7) for further details.

       The  bridge works by querying the init(8) daemon at bridge startup time
       to determine a list of all jobs whose start on or  stop  on  conditions
       reference  the  file event. Further, the bridge arranges to be notified
       automatically when new jobs are created such that any  subsequent  jobs
       which reference the file event are also handled (as are job deletions).

       See inotify(7) and for further details.


OPTIONS
       --daemon
              Detach and run in the background.

       --debug
              Enable debugging output.

       --help Show brief usage summary.

       --user User-session  mode:  connect  to  Upstart  via  the user session
              rather than over the D-Bus system bus.

       --verbose
              Enable verbose output.

JOB ENVIRONMENT VARIABLES
       FILE   Path to file to watch. When run without --user, this must be  an
              absolute  path.  If  --user  is specified, certain relative path
              types are supported:

              o If the path begins with '~/', the value will  be  expanded  as
                would  be performed by a shell for matching purposes (although
                when the event is emitted, the original value will be used).

              o If the path begins with './', '.' will be assumed  to  be  the
                users home directory.

              o In  all  other scenarios, if the path does not begin with '/',
                it will be assumed to represent a file below  the  users  home
                directory.

              If  the  path ends with a slash, it is considered to be a direc-
              tory which changes the match behaviour (see below).

       The  bridge  emits events depending not only on the value of EVENT, but
       also on the entity specified by FILE:

   File
       An event will be emitted when the named file is  created,  modified  or
       deleted  depending  on  the  value of EVENT. If EVENT is not specified,
       react to creation, modification and deletion.

       If the file already exists when the job is registered, and EVENT either
       specifies  create  or  the variable is not specified, the event will be
       emitted.

   Directory
       An event will be emitted when the named directory is created,  modified
       (files within it are created, modified or deleted) or deleted depending
       on the value of EVENT. If EVENT is not specified,  react  to  creation,
       modification and deletion.

       If  the  directory already exists when the job is registered, and EVENT
       either specifies create or the variable is  not  specified,  the  event
       will be emitted.

   Glob
       One  event will be emitted per match when the glob wildcard matches any
       files in the directory part is created, modified or deleted,  depending
       on  the  value  of EVENT. If EVENT is not specified, react to creation,
       modification and deletion.

       If any matches already exist when the  job  is  registered,  and  EVENT
       either  specifies  create or the variable is not specified, events will
       be emitted.

NOTES
       o   A single instance of the bridge may be run at the system level, but
           multiple  further instances may be run per user session instance by
           using the --user.

       o   All job conditions specifying the file event are multi-shot: if the
           same  file  event  occurs  multiple  times, the bridge will emit an
           Upstart event each time.

LIMITATIONS
       o   Since the bridge currently uses inotify(7), it is  subject  to  the
           same  limitations;  namely that recursive watches cannot be created
           reliably in all circumstances. As such, pathological scenarios such
           as deep directory trees being created and then quickly removed can-
           not be handled reliably. The following provides advice to  minimise
           unexpected behaviour:

           o   Attempt  to  only  watch  for  files to be created, modified or
               deleted in directories that are guaranteed to already exist  at
               the time the job is registered by the bridge.

           o   If the system cannot guarantee that the directory will exist at

BUGS
       Report bugs at <https://launchpad.net/ubuntu/+source/upstart/+bugs>

COPYRIGHT
       Copyright (C) 2013 Canonical Ltd.

       This is free software; see the source for copying conditions.  There is
       NO  warranty;  not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
       PURPOSE.

SEE ALSO
       init(5) init(8) inotify(7) file-event(7)



upstart                           2013-03-11            upstart-file-bridge(8)
Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2017 Hurricane Electric. All Rights Reserved.