Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

repeater linux autostart

Post Reply
trustinfo
Posts: 3
Joined: 2007-03-01 22:38

repeater linux autostart

Post by trustinfo »

I have install the linux repeater on a centos server.
I dont want to start repeater in the log mode.
How can i start repeater at bootup??

Thanks
ctrlaltca
8
8
Posts: 10
Joined: 2007-02-20 17:08

Re: repeater linux autostart

Post by ctrlaltca »

Refer to CentOs documentation on how to do it. The repeater is a simple executable, you have to create some boot script for it (tipically in /etc/rc.d).
franc
20
20
Posts: 41
Joined: 2005-06-25 21:57

Re: repeater linux autostart

Post by franc »

hello,
i tried the same thing on a suse 10.0 machine, but i gave up after many attempts with yast2 and without it (by creating a startup-skript with skeleton in init.d).
this repeater sticks to its console if started as daemon.
in the end i made a startscript (called repeaterexec) with simple:

/usr/bin/repeater 1>>/var/log/repeater.log 2>&1 &

but i have to start it manually, i couldn't do that as a daemon.
maybe you found something, then please post it...
franc
ctrlaltca
8
8
Posts: 10
Joined: 2007-02-20 17:08

Re: repeater linux autostart

Post by ctrlaltca »

Suse: it's not as difficult, just create a bash script like this:

Code: Select all

      #!/bin/sh
      #
      # /etc/init.d/x10repeater
      #
      # Initializes the ultravnc linux repeater
      #
      ### BEGIN INIT INFO
      # Provides:          ultravncrepeater
      # Required-Start:
      # Required-Stop:
      # Default-Start:
      # Default-Stop:
      # Description:       Initializes the ultravnc linux repeater
      ### END INIT INFO

      . /etc/rc.status

       rc_reset
         case $1 in
           start|b)
             echo -n "Starting UltraVnc repeater"
             /usr/bin/repeater 1>>/var/log/repeater.log 2>&1 &
             rc_status -v
             ;;
           stop)
             echo -n "Stopping UltraVnc repeater"
             killall repeater
             rc_status -v
             ;;
           *)
         echo "usage: x10repeater {start|stop}"
         ;;
         esac
       rc_exit
Save it as /etc/init.d/x10repeater, then make it executable:
chmod +x /etc/init.d/x10repeater

Insert the init-script into the runlevels:

* Open YaST2.
* "System"->"Runlevel-Editor".
* Click on "expertmode" at the Runlevel-Editor.
* Select the init-script.
* Select "runlevel 3" on the bottom.
* "start/stop/status"->"start now"

Be careful: i wrote down this but i haven't a suse system to test it, so something can be different / wrong.. but i hope it can be a good start point for you.
franc
20
20
Posts: 41
Joined: 2005-06-25 21:57

Re: repeater linux autostart

Post by franc »

THIS IS WORKING INSTANTLY!

many thanks,

franc
franc
20
20
Posts: 41
Joined: 2005-06-25 21:57

Re: repeater linux autostart

Post by franc »

Oh, to early joyed :cry:
The script is displayed in the yast2 runlevel editor correctly and i can start and stop it without error. But if the system restarts, the repeater is NOT running although it is displayed in the yast2 runlevel editor as running (running: YES).
So i am as far as before. The only advantage is that now i can start and stop the repeater without the killproc command
/etc/init.d/x10repeater start (or stop)
What can it be, that the startscript doesn't really start the repeater?

Thank you,
franc
Last edited by franc on 2007-05-05 08:21, edited 2 times in total.
razor
8
8
Posts: 8
Joined: 2007-02-21 07:11

Re: repeater linux autostart

Post by razor »

freebsd
/usr/local/etc/rc.d/repeater.sh
=======================
#!/bin/sh

DAEMON=/usr/local/uvnc/repeater
PIDFILE=/var/run/uvnc.pid
LOGFILE=/usr/local/uvnc/uvnc.log
ecode=1

case "$1" in
start)
if [ -f "${DAEMON}" -a -x "${DAEMON}" ]; then
if [ -f "${PIDFILE}" ]; then
echo ' repeater) PID file found - not starting'
else
# запускаем
"$DAEMON" /usr/local/uvnc/uvncrepeater.ini > "$LOGFILE" 2>&1 &
# если запуск прошел успешно
sleep 1
ps -ax | grep ${DAEMON} | grep -v grep | awk '{print $1}' > ${PIDFILE}
echo ' REPEATER - STARTED'
ecode=0
fi
else
echo ' "${DAEMON}" executable not found - not starting'
fi
;;
stop)
if [ -f "${PIDFILE}" ]; then
# останавливаем repeater
read -r pid junk < "${PIDFILE}"
kill -SIGTERM ${pid}
rm -f ${PIDFILE}
echo ' REPEATER - STOPPED'
else
echo ' REPEATER PID file not found - not killing'
fi
;;
restart)
$0 stop
sleep 5
$0 start
;;
*)
echo "usage: ${0##*/} {start|stop|restart}" >&2
;;
esac

exit $ecode
===============
Last edited by razor on 2007-05-18 11:02, edited 1 time in total.
Post Reply