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
#
# chkconfig: 5 98 02
# description: Starts/stops synergy client when X server is started/stopped
# description: Starts/stops synergy client
#
# 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
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
function startproc ()
{
daemon $*
}
function checkproc ()
{
status $*
}
function rc_status ()
{
RETVAL=$?
}
function rc_exit ()
{
exit $RETVAL
}
fi
case "$1" in
start)
echo -n "Starting synergy client: "
daemon synergy $ARGS
RETVAL=$?
echo
startproc $SYNERGY_BIN $ARGS
rc_status -v
;;
stop)
echo -n "Stopping synergy client: "
killproc synergy
RETVAL=$?
echo
;;
status)
status synergy
RETVAL=$?
killproc -TERM $SYNERGY_BIN
rc_status -v
;;
restart)
$0 stop
$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}"
exit 1
esac
exit $RETVAL
rc_exit

View File

@ -3,41 +3,73 @@
# Startup script for synergy server
#
# chkconfig: 5 98 02
# description: Starts/stops synergy server when X server is started/stopped
# description: Starts/stops synergy server
#
# 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
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
function startproc ()
{
daemon $*
}
function checkproc ()
{
status $*
}
function rc_status ()
{
RETVAL=$?
}
function rc_exit ()
{
exit $RETVAL
}
fi
case "$1" in
start)
echo -n "Starting synergy server: "
daemon synergyd $ARGS
RETVAL=$?
echo
startproc $SYNERGYD_BIN $ARGS
rc_status -v
;;
stop)
echo -n "Stopping synergy server: "
killproc synergyd
RETVAL=$?
echo
;;
status)
status synergyd
RETVAL=$?
killproc -TERM $SYNERGYD_BIN
rc_status -v
;;
restart)
$0 stop
$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}"
exit 1
esac
exit $RETVAL
rc_exit