-
-
Save kholis/4a901de5993d5a070dcb to your computer and use it in GitHub Desktop.
RLM init.d linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# | |
# rlm Start/Stop rlm | |
# | |
# chkconfig: 345 98 01 | |
# description: some startup script | |
#---------------------------------------------------------------- | |
#---------------------------------------------------------------- | |
#---------------------------------------------------------------- | |
# NOTE: | |
# NOTE: Configure these 5 variables for your system | |
# NOTE: | |
# Set rlmuser to the user under which rlm will run | |
rlmuser=hadmin | |
# Set rlmdir to the directory where the rlm binaries are found | |
rlmdir=/opt/RLMServer | |
# Set licfile to the path to the license file | |
licfile=$rlmdir/server.lic | |
# Set debuglog to the path to the debug log | |
debuglog=+$rlmdir/rlm-debug.log | |
#---------------------------------------------------------------- | |
#---------------------------------------------------------------- | |
#---------------------------------------------------------------- | |
start() { | |
echo $debuglog | |
su - $rlmuser -c "cd $rlmdir && ./rlm -c $licfile -dlog $debuglog &" | |
} | |
stop() { | |
su - $rlmuser -c "echo 'y' | $rlmdir/rlmutil rlmdown RLM -q" | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
stop | |
sleep 2 | |
start | |
;; | |
*) | |
echo $"Usage: $0 {start|stop|restart}" | |
exit 1 | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment