Re: [BackupPC-users] shadowmountrsync
2013-02-12 22:19:54
I think that will let go of the connection before rsync is actually setup.
I have a VERY hackish solution, though I would definately like
something cleaner. I have added a command to find and kill the sshd
it came in on. It works, but I need to add in an sshd restart every
morning.
if [ $RETURN -le 0 ] ; then #No error
for ((WAIT=1; WAIT <=SHORTTIME; WAIT++)) ; do # Wait
for rsync to set up
if [ -e "$RSYNCDPID" ]; then
[ -n "$LOG" ] && echo -e "..Rsyncd
started successfully (PID=$(< $RSYNCDPID))...$PASS\n" >> $LOG
-> ps -s |grep sshd |tail -n 1 | cut
-c-8 | xargs kill -f
exit 0 # Exit 0 on success
fi
sleep 1
done
[ -n "$LOG" ] && echo -e "--Rsyncd failed to
start...$PASS\n" >> $LOG
RETURN=10 # Rsyncd failed to start
fi
clean_up # Clean up on failure...
exit $RETURN # Return failure code
On Tue, Feb 12, 2013 at 8:55 AM, Les Mikesell <lesmikesell AT gmail DOT com>
wrote:
> On Tue, Feb 12, 2013 at 9:42 AM, Shawn T Perry <shawn AT redmop DOT com>
> wrote:
>> Does anyone else have any idea on how to solve this problem?
>>
>
> Did you try the I/O redirection on any commands that will keep
> running? Or using 'ssh -n'?
>
> --
> Les Mikesell
> lesmikesell AT gmail DOT com
>
> ------------------------------------------------------------------------------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013
> and get the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> BackupPC-users mailing list
> BackupPC-users AT lists.sourceforge DOT net
> List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki: http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|
|
|