summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2011-05-13 14:30:51 +0000
committerPaul Buetow <paul@buetow.org>2011-05-13 14:30:51 +0000
commite49102eea89f9f7b44945401882e7284b593f7cf (patch)
treea5f7888486cc71410a813a1102eef50383ab4dce
parentde172f7b7af3261e8758d9b597abd5f2379ca9f8 (diff)
added initial README file
plus some other stuff
-rw-r--r--CHANGELOG5
-rw-r--r--README27
-rw-r--r--bin/perldaemon3
-rw-r--r--conf/perldaemon.conf2
-rw-r--r--lib/PerlDaemon/RunModules.pm5
5 files changed, 38 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 33c72ed..632f248 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+* Added ./bin directory and moved
+* Some minor fixes
+
Do 17. Mär 09:10:38 CET 2011
* Renamed DaemonLogic into RunModule
* Added ./conf and ./PerlDaemon subdirs and moved stuff into it
@@ -8,7 +11,7 @@ Fr 11. Mär 08:54:39 CET 2011
Mo 7. Mär 21:43:23 CET 2011
* Introduced simple OOP to the PerlDaemon
- Added a Logger and a DaemonLogic class.
+* Added a Logger and a DaemonLogic class.
So 6. Feb 13:14:32 CET 2011
* PerlDaemon is now CamelCase
diff --git a/README b/README
new file mode 100644
index 0000000..a607e2e
--- /dev/null
+++ b/README
@@ -0,0 +1,27 @@
+HELLO WORLD
+
+RunModuleemon is a minimal linux/unix daemon programmed in Perl.
+It can be extended to fit any task...
+
+It supports:
+* Automatic daemonizing
+* Logging and logrotate support (SIGHUP)
+* Clean shutdown support (SIGTERM)
+* Pidfile support (incl. check on startup)
+* Easy to configure
+* Easy to extend (writing your own modules within PerlDaemonModules::)
+
+QUICK START GUIDE:
+
+# Starting
+./bin/perldaemon start
+
+# Stopping
+./bin/perldaemon stop
+
+# Writing your own modules:
+cd ./lib/PerlDaemonModules/
+cp ExampleModule.pm YourModule.pm
+vi YourModule.pm
+cd -
+./bin/perldaemon restart
diff --git a/bin/perldaemon b/bin/perldaemon
index 83b4b5d..d7b1792 100644
--- a/bin/perldaemon
+++ b/bin/perldaemon
@@ -1,5 +1,4 @@
-#!/bin/bash -x
-
+#!/bin/bash
declare -a LIBPATHS=(./lib ../lib /lib /usr/lib /usr/local/lib /opt/lib)
diff --git a/conf/perldaemon.conf b/conf/perldaemon.conf
index efe4262..df5992c 100644
--- a/conf/perldaemon.conf
+++ b/conf/perldaemon.conf
@@ -4,4 +4,4 @@ daemon.loopinterval = 3
daemon.alivefile = ./run/perldaemon.alive
daemon.pidfile = ./run/perldaemon.pid
daemon.logfile = ./log/perldaemon.log
-daemon.require = ./lib/require.pm
+daemon.modulesdir = ./lib/PerlDaemonModules
diff --git a/lib/PerlDaemon/RunModules.pm b/lib/PerlDaemon/RunModules.pm
index ca9ddf9..0dcd3d7 100644
--- a/lib/PerlDaemon/RunModules.pm
+++ b/lib/PerlDaemon/RunModules.pm
@@ -10,6 +10,9 @@ sub new ($$$) {
if (-d $modulesdir) {
$logger->logmsg("Loading modules from $modulesdir");
+
+ } else {
+ $logger->warn("Modules dir $modulesdir does not exist!");
}
return $self;
@@ -19,6 +22,8 @@ sub do ($) {
my $self = shift;
my $conf = $self->{conf};
my $logger = $conf->{logger};
+
+ $logger->warn("No modules are loaded!");
}
1;