updated init.d scripts to work with SuSE. however, it looks as

if they cannot be used on an X server using authentication
because the daemons they start are not authorized to connect to
the X server.  X users should modify Xsetup or Xsession.
This commit is contained in:
crs 2002-07-19 20:44:57 +00:00
parent 47f7e3c4d5
commit 587f5247d8
2 changed files with 118 additions and 54 deletions

View File

@ -3,41 +3,73 @@
# Startup script for synergy client # Startup script for synergy client
# #
# chkconfig: 5 98 02 # chkconfig: 5 98 02
# description: Starts/stops synergy client when X server is started/stopped # description: Starts/stops synergy client
# #
# processname: synergy # processname: synergy
#
### BEGIN INIT INFO
# Provides: synergy
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 5
# Default-Stop: 0 1 2 3 6
# Description: Start synergy client daemon.
### END INIT INFO
SYNERGY_BIN=/usr/sbin/synergy
test -x $SYNERGY_BIN || exit 5
# startup command line arguments # startup command line arguments
ARGS=192.168.1.3 ARGS=192.168.1.3
# Source function library. # load function library
if test -f /etc/rc.status; then
. /etc/rc.status
rc_reset
else
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
function startproc ()
{
daemon $*
}
function checkproc ()
{
status $*
}
function rc_status ()
{
RETVAL=$?
}
function rc_exit ()
{
exit $RETVAL
}
fi
case "$1" in case "$1" in
start) start)
echo -n "Starting synergy client: " echo -n "Starting synergy client: "
daemon synergy $ARGS startproc $SYNERGY_BIN $ARGS
RETVAL=$? rc_status -v
echo
;; ;;
stop) stop)
echo -n "Stopping synergy client: " echo -n "Stopping synergy client: "
killproc synergy killproc -TERM $SYNERGY_BIN
RETVAL=$? rc_status -v
echo
;;
status)
status synergy
RETVAL=$?
;; ;;
restart) restart)
$0 stop $0 stop
$0 start $0 start
RETVAL=$? rc_status
;;
status)
echo -n "Checking for synergy client: "
checkproc $SYNERGY_BIN
rc_status -v
;; ;;
*) *)
echo "Usage: synergy {start|stop|status|restart}" echo "Usage: synergy {start|stop|status|restart}"
exit 1 exit 1
esac esac
exit $RETVAL rc_exit

View File

@ -3,41 +3,73 @@
# Startup script for synergy server # Startup script for synergy server
# #
# chkconfig: 5 98 02 # chkconfig: 5 98 02
# description: Starts/stops synergy server when X server is started/stopped # description: Starts/stops synergy server
# #
# processname: synergyd # processname: synergyd
#
### BEGIN INIT INFO
# Provides: synergyd
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 5
# Default-Stop: 0 1 2 3 6
# Description: Start synergy server daemon.
### END INIT INFO
SYNERGYD_BIN=/usr/sbin/synergyd
test -x $SYNERGYD_BIN || exit 5
# startup command line arguments # startup command line arguments
ARGS= ARGS=
# Source function library. # load function library
if test -f /etc/rc.status; then
. /etc/rc.status
rc_reset
else
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
function startproc ()
{
daemon $*
}
function checkproc ()
{
status $*
}
function rc_status ()
{
RETVAL=$?
}
function rc_exit ()
{
exit $RETVAL
}
fi
case "$1" in case "$1" in
start) start)
echo -n "Starting synergy server: " echo -n "Starting synergy server: "
daemon synergyd $ARGS startproc $SYNERGYD_BIN $ARGS
RETVAL=$? rc_status -v
echo
;; ;;
stop) stop)
echo -n "Stopping synergy server: " echo -n "Stopping synergy server: "
killproc synergyd killproc -TERM $SYNERGYD_BIN
RETVAL=$? rc_status -v
echo
;;
status)
status synergyd
RETVAL=$?
;; ;;
restart) restart)
$0 stop $0 stop
$0 start $0 start
RETVAL=$? rc_status
;;
status)
echo -n "Checking for synergy server: "
checkproc $SYNERGYD_BIN
rc_status -v
;; ;;
*) *)
echo "Usage: synergyd {start|stop|status|restart}" echo "Usage: synergyd {start|stop|status|restart}"
exit 1 exit 1
esac esac
exit $RETVAL rc_exit