administrator@mtbuntu:~$ cat /etc/init.d/lwsmd
#! /bin/sh
#
# Copyright (c) BeyondTrust Software. All rights reserved.
#
### BEGIN INIT INFO
# Provides: lwsmd
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start and Stop PBIS Service Manager
### END INIT INFO
PROG_DESC="PBIS Service Manager"
PROG_BIN=/opt/pbis/sbin/lwsmd
PROG_ARGS="--start-as-daemon"
PIDFILE=
SCRIPTNAME="lwsmd"
STARTHOOK="fix_locale"
lookup_user_locale()
{
. /etc/sysconfig/language
printf 'LANG=%q; export LANG\n' "$RC_LANG"
printf 'LC_ALL=%q; export LC_ALL\n' "$RC_LC_ALL"
printf 'LC_CTYPE=%q; export LC_CTYPE\n' "$RC_LC_CTYPE"
}
fix_locale()
{
if [ "$LC_ALL" = "POSIX" ]
then
unset LC_ALL
export LC_ALL
fi
if type locale >/dev/null &&
locale | grep LC_CTYPE | grep POSIX >/dev/null; then
if [ -f /etc/sysconfig/language ]; then
eval "`lookup_user_locale`"
elif [ -f /etc/default/locale ]; then
. /etc/default/locale
export LANG
fi
elif [ -z "$LANG" ]; then
LANG="en_US.UTF-8"
export LANG
fi
}
. /opt/pbis/libexec/init-base.sh