/*
 * Argus-5.0 Software.  Startup Readme
 * Copyright (c) 2000-2024 QoSient, LLC
 * All rights reserved.
 *
 * This program is free software, released under the GNU General
 * Public License; you can redistribute it and/or modify it under the terms
 * of the GNU General Public License as published by the Free Software
 * Foundation; either version 3, or any later version.
 *
 * Other licenses are available through QoSient, LLC.
 * Inquire at info@qosient.com.
 *
 * This program is distributed WITHOUT ANY WARRANTY; without even the
 * implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * Written by Carter Bullard
 * QoSient, LLC
 *
 */

These scripts are intended to help manage the starting/stopping of
Argus daemons, both during system boot as well as in normal operation,
on a number of platforms, such as Linux, using the chkconfig
system, and Mac OS X, with /Library/StartupItems packages.


Under Linux 

Systemctl

The argus.service file can be used on Fedora (and RedHat Linux?) to automatically
start argus at boot time.  Put the file argus.service in /lib/systemd/system, then
run these two commands as root:

 # systemctl enable argus.service
 # systemctl start argus.service

After that, argus should be automatically started when the system boots.


Chkconfig

The ./argus script takes one of four arguments, start, stop, restart
and status.  If the specific /etc configuration file is not found,
the daemon will be run with some assumptions about the system configuration
and writes its logs to /var/log/argus.

For installation on Linux:

The linux chkconfig system, assumes that the scripts that are run from
the /etc/init.d directory return, as the boot process runs each script
sequentially, and doesn't progress until each process returns.

This means that argus and radium need to run as daemons, in the background.
As a result, do check that the individual /etc/ configuration files,
argus.conf and radium.conf, set the [ARGUS|RADIUM}_DAEMON variable to
"yes".

Edit the PATH variable in the script to the directory the binary is
located in.

Then, install the script in /etc/rc.d/init.d.  After this, if your system
supports the chkconfig() utility, you can use that to install argus and
then have it start when the system boots.


      # cp argus /etc/rc.d/init.d
      # chkconfig --add argus
      # chkconfig --level 2345 argus on


If your system doesn't have chkconfig(), then simply create a link to the
/etc/rc.d/init.d/argus file in the run level that you want the daemon to
run in.  Most systems will have this as run level 3.
 
      # cd /etc/rc.d/rc3.d
      # ln -s ../init.d/argus argus



Mac OS X

Launchctl

The com.qosient.argus.plist is a configuration file used with the Mac OS X
launchctl system.  This file should be installed into the /Library/LaunchDaemons
directory on the target machine.  This will allow Mac OS X to start argus when
the machine boots, and to ensure that it is always running.

The included scripts assume that argus has been installed in the default
/usr/local/sbin directory, so if you have done something out of the ordinary,
you will need to modify the scripts.

For installation on Mac OS X:
   # cp com.qosient.argus.plist /Library/LaunchDaemons
   # launchctl load  /Library/LaunchDaemons/com.qosient.argus.plist

