Start/Stop script for a prosess run as another user
#!/bin/sh # rc.flexlm – Init.d start/stop script for the FlexLM License Manager # Variables: LM_DIR=”/usr/local/matlab71/etc” LM_BIN=”lmgrd” PROG_BIN=”$LM_DIR/glnx86/$LM_BIN” LICENSE_FILE=”$LM_DIR/license.dat” RUN_AS=flexlm LOG_FILE=”/var/log/flexlm.log” PROG_ARGS=”-c $LICENSE_FILE -l $LOG_FILE” # Sleep time for restart. SLEEP=1 start() { echo -n “Starting FlexLM License Manager ($LM_BIN): ” # already running? PID=$(pidof -s $PROG_BIN) if [ -z $PID ]; then # Initialize log […]