upstart-file-bridge(8)


NAME

   upstart-file-bridge - Bridge between Upstart and inotify

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,
   modification 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:

          * 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).

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

          * 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
          directory which changes the match behaviour (see below).

          If the path is not a directory, the file (but not the directory)
          portion of the path may contain wildcard matches. See fnmatch(3)
          and glob(7) for further details.

   EVENT  Event relating to FILE  that  job  is  interested  in.  If  this
          variable is specified the value must be set to create, modify or
          delete  depending  on  what  type  of  file  event  the  job  is
          interested  in.  If FILE is not specified, the bridge will watch
          for all types and set this variable  to  the  appropriate  value
          when emitting the event.

WATCH TYPE BEHAVIOUR

   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

   *   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.

   *   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

   *   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
       cannot be  handled  reliably.  The  following  provides  advice  to
       minimise unexpected behaviour:

       *   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.

       *   If the system cannot guarantee that the directory will exist at
           job registration time, arrange for the directory to be  created
           by an Upstart job before the bridge itself starts.

       *   In  user  session  mode, if a job specifies a file to watch for
           and that file is created but inaccessible to the  user  running
           the bridge, no event will be emitted.

   *   Tilde  expansion  is  only  supported for the current user; that is
       '~otheruser' will not work.

AUTHOR

   Written by James Hunt <james.hunt@canonical.com>

BUGS

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

COPYRIGHT

   Copyright  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)





Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.