Commit graph

80 commits

Author SHA1 Message Date
Matt Phillips
deaf492b95 adds quiet boolean constructor flag 2013-07-12 14:31:32 -04:00
934e7eb6d7 Version bump for CPAN release. 2013-07-10 20:58:49 -07:00
Karen Etheridge
f657f78626 properly write the pid (not 0) to the pidfile in single fork mode (GH#49) 2013-07-10 16:23:28 -07:00
Ævar Arnfjörð Bjarmason
71fd6f0779 Make it possible to set user/group to root/root
Change the check for valid users/groups to check for definiedness
instead of for whether the return value is true. Makes it possible to
run a daemon as root/root.
2013-05-08 22:29:43 +02:00
Ævar Arnfjörð Bjarmason
7bc1529dfe Having non-ASCII characters in the POD requires "=encoding utf8" 2013-05-08 17:24:29 +00:00
80cefba89d Changes and Contrib updates from last pull. 2013-05-08 10:17:10 -07:00
fbf308a670 Prepping for CPAN Release. 2013-04-29 15:07:14 -07:00
Karen Etheridge
4fedc8521c ensure stdout is flushed immediately during pretty_print 2013-04-29 09:53:33 -07:00
Karen Etheridge
42f433a62a "prereq_no_process" feature
Searches the `ps` list for anything that looks like the daemon that might
already be running.

Both the program name and arguments are checked, as it appears different
operating systems vary as to how they populate `ps`:  On ubuntu, my daemon
looks like:

    /path/to/perl /path/to/program args

but on CentOS, the very same code shows up as:

    /path/to/program args
2013-04-22 16:12:26 -07:00
cfadb8f133 Merge pull request #42 from karenetheridge/topic/fix_broken_tests
Topic/fix broken tests
2013-04-19 18:45:19 -07:00
Karen Etheridge
aaca307478 fix broken tests - piddir could be current directory 2013-04-19 13:37:59 -07:00
Karen Etheridge
e56baf1a88 check every second for kill_timeout seconds if the daemon has terminated, rather than only checking at the end 2013-04-19 11:40:26 -07:00
Karen Etheridge
0aa0e9e4f9 we can always determine the new $USER, from uid if necessary 2013-04-18 16:50:15 -07:00
Karen Etheridge
bcc3e970c0 fix "Can't use an undefined value as an ARRAY reference at ... line 177" when exec fails and program_args is not defined 2013-04-18 16:49:18 -07:00
Karen Etheridge
e2753e5f8b create the pid_file dir if it does not exist
- steal the _create_resource_dir sub to create a generic dir
- re-use it to create the pid dir
- with a few more trace() diagnostics too
2013-04-18 16:49:18 -07:00
Karen Etheridge
c3cf4cdfbb spelling 2013-04-18 16:49:18 -07:00
0cf3808212 Version Bump - Released to CPAN. 2013-02-26 01:37:47 -08:00
Giacomo Montagner
156a8cba84 fixed warn "uninitialized value $called_with" 2013-02-03 04:58:40 +01:00
Karen Etheridge
62d8c37d98 spelling 2012-09-08 16:17:00 -07:00
Karen Etheridge
5ff792cb06 fixed all trailing whitespace 2012-09-08 16:14:57 -07:00
f878431080 update COPYRIGHT as well to indicate their copyright 2012-09-04 15:18:17 -07:00
dbc2f629b7 Thank you, (mt) Media Temple. 2012-09-04 15:11:00 -07:00
e14a853d71 Documentation updates. 2012-09-04 15:03:37 -07:00
def0e11b71 User staging + inline init code. 2012-09-04 14:44:07 -07:00
b021c8c693 Added help accessor, and do_help. 2012-09-04 13:54:35 -07:00
a4af26baa3 No writing of PID when single-forking. 2012-09-04 13:38:54 -07:00
242cc76e20 Automatically fill in the GID if not given, but UID is set. 2012-09-04 13:35:22 -07:00
Karen Etheridge
8426836310 List actions when an invalid one is given. 2012-09-04 13:25:46 -07:00
617ff6879b Updated PID file to be written as the current user and then chmoded 2012-09-04 13:18:03 -07:00
5ad22a23e8 Added resource_dir creation. 2012-09-04 13:11:50 -07:00
6bc99a18f3 Added trace function. 2012-09-04 12:54:15 -07:00
49e76c666b HUP -> Reload. 2012-09-03 13:50:09 -07:00
afc8978b78 New option: umask to set the umask value when the daemon launches. 2012-09-03 13:24:55 -07:00
2479dcc673 pid_running returns 0 on a PID less than 1 as reported by James Wright 2012-09-03 12:48:36 -07:00
9d3bf6a3e1 Added option kill_timeout. 2012-09-03 12:43:43 -07:00
d88fa81cdf Using warn instead of printing to stderr. 2012-09-03 12:27:03 -07:00
8c0a1fd754 Merge pull request #20 from karenetheridge/topic/misc_doc_fixes
Topic/misc doc fixes
2012-09-03 12:20:58 -07:00
04516f445e Merge pull request #26 from karenetheridge/topic/init.d_version_logging
include the date and module version in the generated init file
2012-09-03 12:14:02 -07:00
Karen Etheridge
ea7977f78b since we can figure out the absolute path, might as well use it 2012-06-15 13:36:24 -07:00
Karen Etheridge
d21eb7d582 document a good init_config value to use with perlbrew 2012-06-15 13:26:15 -07:00
Karen Etheridge
db10ca03e9 include the date and module version in the generated init file 2012-06-15 13:08:23 -07:00
Karen Etheridge
5d52839720 misc grammar and spelling 2012-06-11 21:09:14 +00:00
Karen Etheridge
c189a5f7e9 properly format code examples as code 2012-06-11 21:09:06 +00:00
chromatic
b15886199e Fixed a couple of documentation typos. 2012-06-08 15:41:40 -07:00
2f3b544096 A better MANIFEST.SKIP -- It works now. 2012-04-19 19:10:24 -07:00
dfdaeb58a2 Added Makefile to manifest.skip. 2012-04-19 18:03:56 -07:00
3a58e3d35e 0.0.7
* Added user and group accessors to set uid/gid based on names
    * Updated docs.
2012-04-15 23:19:06 -07:00
007ff90b4f Added user and group accessors, no more magical resolution of non-numeric uid/gid. 2012-04-15 22:46:39 -07:00
f2af7b215f 0.0.6 2012-15-04 SymKat <symkat@symkat.com>
* PID file will be deleted on do_stop
    * PID file will be created by the target user when ->uid set
    * uid() and gid() now take strings as well (doherty)
    * Kill signal order changed to TERM TERM INT KILL
    * init_config option added, gives LSB script a file to source.
    * Typo fixes
    * Mike Doherty (doherty) added to contrib (Thank you!)
2012-04-15 14:19:58 -07:00
Mike Doherty
becd46deef Credit myself in contributors 2012-04-15 14:55:13 -04:00