#include <argp.h>
#include <pwd.h>
#include <string>
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/inotify.h>
#include <fcntl.h>
#include <stdlib.h>
#include <limits.h>
#include "inotify-cxx.h"
#include "appargs.h"
#include "incron.h"
#include "incrontab.h"
#include "incroncfg.h"
Defines | |
| #define | INCRON_ALT_EDITOR "/etc/alternatives/editor" |
| Alternative editor. | |
| #define | INCRON_DEFAULT_EDITOR "vim" |
| Default (hard-wired) editor. | |
| #define | INCRONTAB_VERSION INCRONTAB_NAME " " INCRON_VERSION |
| incrontab version string | |
| #define | INCRONTAB_DESCRIPTION |
| incrontab description string | |
| #define | INCRONTAB_HELP |
| incrontab help string | |
Functions | |
| bool | copy_from_file (const std::string &rPath, const std::string &rUser) |
| Copies a file to an user table. | |
| bool | remove_table (const std::string &rUser) |
| Removes an user table. | |
| bool | list_table (const std::string &rUser) |
| Lists an user table. | |
| bool | edit_table (const std::string &rUser) |
| Allows to edit an user table. | |
| void | list_types () |
| Prints the list of all available inotify event types. | |
| bool | reload_table (const std::string &rUser) |
| Reloads an user table. | |
| int | main (int argc, char **argv) |
inotify cron system
Copyright (C) 2006, 2007 Lukas Jelinek, <lukas@aiken.cz>
This program is free software; you can use it, redistribute it and/or modify it under the terms of the GNU General Public License, version 2 (see LICENSE-GPL).
| #define INCRON_ALT_EDITOR "/etc/alternatives/editor" |
Alternative editor.
| #define INCRON_DEFAULT_EDITOR "vim" |
Default (hard-wired) editor.
| #define INCRONTAB_DESCRIPTION |
Value:
"incrontab - inotify cron table manipulator\n" \ "(c) Lukas Jelinek, 2006, 2007"
| #define INCRONTAB_HELP |
Value:
INCRONTAB_DESCRIPTION "\n\n" \ "usage: incrontab [<options>] <operation>\n" \ " incrontab [<options>] <FILE-TO-IMPORT>\n\n" \ "<operation> may be one of the following:\n" \ " -?, --about gives short information about program\n" \ " -h, --help prints this help text\n" \ " -l, --list lists user table\n" \ " -r, --remove removes user table\n" \ " -e, --edit provides editting user table\n" \ " -t, --types list supported event types\n" \ " -d, --reload request incrond to reload user table\n" \ " -V, --version prints program version\n\n" \ "\n" \ "These options may be used:\n" \ " -u <USER>, --user=<USER> overrides current user (requires root privileges)\n" \ " -f <FILE>, --config=<FILE> overrides default configuration file (requires root privileges)\n\n" \ "For reporting bugs please use http:://bts.aiken.cz\n"
| #define INCRONTAB_VERSION INCRONTAB_NAME " " INCRON_VERSION |
incrontab version string
| bool copy_from_file | ( | const std::string & | rPath, | |
| const std::string & | rUser | |||
| ) |
Copies a file to an user table.
| [in] | rPath | path to file |
| [in] | rUser | user name |
| bool edit_table | ( | const std::string & | rUser | ) |
Allows to edit an user table.
| [in] | rUser | user name |
| bool list_table | ( | const std::string & | rUser | ) |
Lists an user table.
| [in] | rUser | user name |
| void list_types | ( | ) |
Prints the list of all available inotify event types.
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
| bool reload_table | ( | const std::string & | rUser | ) |
Reloads an user table.
| [in] | rUser | user name |
| bool remove_table | ( | const std::string & | rUser | ) |
Removes an user table.
| [in] | rUser | user name |
1.5.1