]> git.ipfire.org Git - people/stevee/guardian.git/blobdiff - guardian.in
guardian: Some typo fixes.
[people/stevee/guardian.git] / guardian.in
index 767171407ab006e718a36fbf10a11bae64fd42b9..b98dc2e85c87c538d2843171d3e525bc73540eff 100644 (file)
@@ -37,7 +37,7 @@ require Guardian::Socket;
 
 use warnings;
 
-# Disable warnings of unjoinded threads when stopping guardian.
+# Disable warnings of unjoined threads when stopping guardian.
 no warnings 'threads';
 
 # Define version.
@@ -58,7 +58,7 @@ if (defined($cmdargs{"help"})) {
        print "Guardian $version \n";
        print "Usage: guardian <optional arguments>\n";
        print " -c, --config\t\tspecifiy a configuration file other than the default (/etc/guardian/guardian.conf)\n";
-       print " -f, --foreground\trun in the foreground (doesn't fork, any output goes to STDOUT)\n";
+       print " -f, --foreground\turn in the foreground (doesn't fork, any output goes to STDOUT)\n";
        print " -h, --help\t\tshows this help\n";
        print " -v, --version\t\tdisplay programm version and exit.\n";
        exit;
@@ -69,7 +69,7 @@ if (defined($cmdargs{"help"})) {
 
 # Check if another instance of guardian is allready running.
 if (&Guardian::Daemon::IsRunning()) {
-       die "Another instance of Guardian is allready running...\n";
+       die "Another instance of Guardian is already running...\n";
 }
 
 # Read-in the configuration file and store the settings.
@@ -183,18 +183,18 @@ sub Init () {
 ## with huge logfiles, at initialization time of the worker process, the file will
 ## be opened once and the cursor position of the end of file (EOF) get stored. When
 ## reading any newly added lines from the file, we directly can jump to the last
-## known position and get these lines. Afterwards, we store the current curser position
+## known position and get these lines. Afterwards, we store the current cursor position
 ## again, so we can do it in this way over and over again.
 #
 ## All read lines get stored in an array, which will be passed to the Parser.
 #
-## If any response (action) from the parser get recieved, it will be put into the
+## If any response (action) from the parser is received, it will be put into the
 ## shared event queue.
 #
 sub Worker ($) {
        my $file = $_[0];
 
-       # Obtain the parser name which should be used to parser any
+       # Obtain the parser name which should be used to parse any
        # messages of this file.
        my $parser = $monitored_files{$file};
 
@@ -215,7 +215,7 @@ sub Worker ($) {
 
        # Infinite loop.
        while(1) {
-               # Check if the workers should pause or perform it's desired work.
+               # Check if the workers should pause or perform their desired work.
                if ($workers_pause) {
                        # Wait 1 second until the next check.
                        sleep(1);
@@ -286,7 +286,7 @@ sub Worker ($) {
 ## Socket function.
 #
 ## This function uses the Socket module to create and listen to an UNIX socket.
-## It automatically accepts all incomming connections and pass the recieved
+## It automatically accepts all incoming connections and pass the received
 ## data messages to the the Message_Parser function which is also part of the
 ## socket module.
 #
@@ -300,10 +300,10 @@ sub Socket () {
        # Log successfull creation of socket.
        $logger->Log("debug", "Listening to Socket...");
 
-        # Accept incomming connections from the socket.
+        # Accept incoming connections from the socket.
         while (my $connection = $server->accept()) {
                # Autoflush the socket after the data
-               # has been recieved.
+               # has been received.
                $connection->autoflush(1);
 
                # Gather all data from the connection.
@@ -311,10 +311,10 @@ sub Socket () {
                        # Remove any newlines.
                        chomp($message);
 
-                       # Log recieved socket command.
+                       # Log received socket command.
                        $logger->Log("debug", "Socket - Recieved message: $message");
 
-                       # Send the recieved data message to the
+                       # Send the received data message to the
                        # socket parser.
                        my $action = &Guardian::Socket::Message_Parser($message);
 
@@ -335,7 +335,7 @@ sub Socket () {
 ## Function for capturing process signals.
 #
 ## This function captures any sent process signals and will call various
-## actions, basend on the captured signal.
+## actions, based on the captured signal.
 #
 sub SignalHandler {
        $SIG{INT} = \&Shutdown;
@@ -359,7 +359,7 @@ sub StartWorkers () {
        # Loop through the hash which contains the monitored files and start
        # a worker thread for each single one.
        foreach my $file (keys %monitored_files) {
-               # Check if an worker allready is running for this file.
+               # Check if an worker is already running for this file.
                # If not, start the worker.
                unless (exists($running_workers{$file})) {
                        $logger->Log("debug", "Starting worker thread for $file");
@@ -380,7 +380,7 @@ sub StopWorkers () {
        # Loop through all running workers.
        foreach my $worker (keys %running_workers) {
                # Determine if the worker should be stopped.
-               # This happen if the file should not be longer monitored.
+               # This happens if the file should not be longer monitored.
                unless(exists($monitored_files{$worker})) {
                        $logger->Log("debug", "Stopping worker thread for $worker");
 
@@ -408,7 +408,7 @@ sub StopWorkers () {
 #
 sub PauseWorkers() {
        # Set workers_pause variable to "1".
-       # All workers will be sleep until the variable has been set to "0".
+       # All workers will sleep until the variable has been set to "0".
        $workers_pause = 1;
 
        # Log paused workers.
@@ -438,7 +438,7 @@ sub ResumeWorkers() {
 #
 ## Reload function.
 #
-## This function will get called if the signal handler recieves a "SIGHUP" signal,
+## This function will get called if the signal handler receives a "SIGHUP" signal,
 ## or the reload command will be sent via socket connection. It is responsible for
 ## reloading all configure options and stopping/starting the worker threads.
 #
@@ -483,7 +483,7 @@ sub Reload () {
 #
 ## ReloadIgnoreList function.
 #
-## This function will be called if the signal handler recieves a "SIGUSR1" signal,
+## This function will be called if the signal handler receives a "SIGUSR1" signal,
 ## or the reload-ignore-list command will be sent via the socket connection. It just
 ## performs a simple check if an ignore file has been configured and calls the responsible
 ## function on the events module.
@@ -504,7 +504,7 @@ sub ReloadIgnoreList () {
 #
 ## This function only get called when the logrotate command will be sent via
 ## the socket connection. It is responsible for validating and altering the current
-## curser positions of the monitored files and stopping/starting the worker threads.
+## cursor positions of the monitored files and stopping/starting the worker threads.
 #
 sub Logrotate () {
        # Stop all running workers.
@@ -549,7 +549,7 @@ sub Logrotate () {
 ## Shutdown function.
 #
 ## This function is used to do a clean shutdown of guardian. It will be called
-## by the signal handler when recieving INT (2), QUIT (3) and TERM (15) signals.
+## by the signal handler when receiving INT (2), QUIT (3) and TERM (15) signals.
 #
 sub Shutdown () {
        # Log shutdown.