Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Absent Member.
Absent Member.
661 views

Create a startup script for loggerd on Logger 5.3.1 so it will auto start at boot

I can’t imagine I am the only one who has run into the issue where I could not get the logger setup as a service after a fresh install. After rebuilding the server and installing logger as arcsight under the /opt/arcsight directory I attempted to then setup the newly created server to start at boot time without any luck using the provided script. The issue I ran into is the script needs to be run as root but the loggerd service needs to be ran as acrsight. My work around is below and it works like a champ on Red Hat Enterprise Linux 6.2. This was tested/developed in UAT and then applied to production.

Create the script that chkconfig will use

vi /etc/init.d/loggerd

#!/bin/sh

### BEGIN INIT INFO

# chkconfig: 2345 50 50

# Description: Startup/shutdown script for the Logger service

### END INIT INFO

SERVICE_NAME=loggerd

PID_PATH_NAME=/tmp/loggerd-pid

case $1 in

    start)

        echo ""Starting $SERVICE_NAME ...""

        su - arcsight -c '/opt/arcsight/current/arcsight/logger/bin/loggerd start'

    ;;

    stop)

        echo ""Stopping $SERVICE_NAME ...""

        su - arcsight -c '/opt/arcsight/current/arcsight/logger/bin/loggerd stop'

    ;;

    restart)

        echo ""Restarting $SERVICE_NAME ...""

        su - arcsight -c '/opt/arcsight/current/arcsight/logger/bin/loggerd restart'

    ;;

    status)

        echo ""Checking the status $SERVICE_NAME ...""

        su - arcsight -c '/opt/arcsight/current/arcsight/logger/bin/loggerd status'

    ;;

esac

Create the symbolic link "chkconfig did not create this for me"

ln -s /etc/init.d/loggerd /etc/rc5.d/S99loggerd

Now you can use "service loggerd {start|stop|status|restart)"


Labels (1)
2 Replies
Absent Member.
Absent Member.

Well, that's weird. I've installed SW Logger on VM with CentOS 6.5 and it starts automatically on boot.Снимок экрана 2014-01-24 в 8.59.49.png

0 Likes
Admiral
Admiral

I'll need to double check, but if you install the Logger to run as root, I believe the startup script is created for you if installed to run as a service...

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.