mirror of
https://github.com/debauchee/barrier.git
synced 2024-11-23 20:12:39 +03:00
587f5247d8
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.
76 lines
1.2 KiB
Bash
Executable File
76 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Startup script for synergy client
|
|
#
|
|
# chkconfig: 5 98 02
|
|
# 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
|
|
|
|
# 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: "
|
|
startproc $SYNERGY_BIN $ARGS
|
|
rc_status -v
|
|
;;
|
|
stop)
|
|
echo -n "Stopping synergy client: "
|
|
killproc -TERM $SYNERGY_BIN
|
|
rc_status -v
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
$0 start
|
|
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
|
|
|
|
rc_exit
|