|
|
@ -15,7 +15,9 @@
|
|
|
|
### END INIT INFO
|
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
|
|
|
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
|
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
|
|
DAEMON=/usr/sbin/xrdp
|
|
|
|
BASE=__BASE__
|
|
|
|
|
|
|
|
DAEMON=${BASE}/sbin/xrdp
|
|
|
|
|
|
|
|
SDAEMON=${BASE}/sbin/xrdp-sesman
|
|
|
|
PIDDIR=/var/run/xrdp/
|
|
|
|
PIDDIR=/var/run/xrdp/
|
|
|
|
SESMAN_START=yes
|
|
|
|
SESMAN_START=yes
|
|
|
|
#USERID=xrdp
|
|
|
|
#USERID=xrdp
|
|
|
@ -97,7 +99,7 @@ case "$1" in
|
|
|
|
if [ "$SESMAN_START" = "yes" ] ; then
|
|
|
|
if [ "$SESMAN_START" = "yes" ] ; then
|
|
|
|
log_progress_msg "sesman"
|
|
|
|
log_progress_msg "sesman"
|
|
|
|
start-stop-daemon --start --quiet --oknodo --pidfile $PIDDIR/xrdp-sesman.pid \
|
|
|
|
start-stop-daemon --start --quiet --oknodo --pidfile $PIDDIR/xrdp-sesman.pid \
|
|
|
|
--exec /usr/sbin/xrdp-sesman >/dev/null
|
|
|
|
--exec $SDAEMON >/dev/null
|
|
|
|
value=$?
|
|
|
|
value=$?
|
|
|
|
[ $value -gt 0 ] && exitval=$value
|
|
|
|
[ $value -gt 0 ] && exitval=$value
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -117,9 +119,9 @@ case "$1" in
|
|
|
|
exitval=0
|
|
|
|
exitval=0
|
|
|
|
log_daemon_msg "Stopping RDP Session manager "
|
|
|
|
log_daemon_msg "Stopping RDP Session manager "
|
|
|
|
log_progress_msg "sesman"
|
|
|
|
log_progress_msg "sesman"
|
|
|
|
if pidofproc -p $PIDDIR/xrdp-sesman.pid /usr/sbin/xrdp-sesman > /dev/null; then
|
|
|
|
if pidofproc -p $PIDDIR/xrdp-sesman.pid $SDAEMON > /dev/null; then
|
|
|
|
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDDIR/xrdp-sesman.pid \
|
|
|
|
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDDIR/xrdp-sesman.pid \
|
|
|
|
--chuid $USERID:$USERID --exec /usr/sbin/xrdp-sesman
|
|
|
|
--chuid $USERID:$USERID --exec $SDAEMON
|
|
|
|
exitval=$?
|
|
|
|
exitval=$?
|
|
|
|
else
|
|
|
|
else
|
|
|
|
log_progress_msg "apparently not running"
|
|
|
|
log_progress_msg "apparently not running"
|
|
|
@ -164,7 +166,7 @@ case "$1" in
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ "$SESMAN_START" = "yes" ] ; then
|
|
|
|
if [ "$SESMAN_START" = "yes" ] ; then
|
|
|
|
log_daemon_msg "Checking status of RDP Session Manager" "sesman"
|
|
|
|
log_daemon_msg "Checking status of RDP Session Manager" "sesman"
|
|
|
|
if pidofproc -p $PIDDIR/xrdp-sesman.pid /usr/sbin/xrdp-sesman > /dev/null; then
|
|
|
|
if pidofproc -p $PIDDIR/xrdp-sesman.pid $SDAEMON > /dev/null; then
|
|
|
|
log_progress_msg "running"
|
|
|
|
log_progress_msg "running"
|
|
|
|
log_end_msg 0
|
|
|
|
log_end_msg 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|