[Techtalk] init script for rsync- corrected

Carla Schroder carla at bratgrrl.com
Mon Jun 21 21:33:57 EST 2004


Oops ignore the previous one- this is the correct version


On Monday 21 June 2004 6:33 pm, Carla Schroder wrote:
> This is a simple startup script to run rsync in daemon mode. It should run 
on 
> all Linuxes, please note the refreshing absence of Red Hat- and other 
> distribution isms. Methinks using #!/bin/sh for 'portability', then 
> referencing /etc/sysconfig is sending mixed messages. :)
> 
> #!/bin/bash
> # simple init script to start
> # rsync in daemon mode
> 
> case "$1" in
> 	start)
> 		echo "Starting the rsync server..."
> 		exec /usr/bin/rsync --daemon 
> 		;;
> 
> 	stop)
> 		echo "Stopping the rsync server...."
> 		killall /usr/bin/rsync
> 		;;
>             
> 	restart)
> 		$0 stop
> 		sleep 1
> 		$0 start
> 		;;
> 		
> 	*)
> 		echo "Usage: $0 {start|stop|restart|}"
> 		exit 1
> 		;;
> esac
> 
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Carla Schroder
> this message brought to you
> by Libranet 2.8 and Kmail
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/techtalk
> 
> 
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Carla Schroder
this message brought to you
by Libranet 2.8 and Kmail
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the Techtalk mailing list