rsync start Stop Script

Source: Internet
Author: User
Tags stop script rsync

Find a perfect RYSNC on the Internet script: http://linux5588.blog.51cto.com/65280/779000

Rsync Source code:

[email protected] d4]# cat Rsync_start_restart.sh#!/bin/shif ["$" = = "Restart"];then        [-f/var/run/rsyncd.pid] &A mp;& kill ' Cat/var/run/rsyncd.pid '    /bin/rm-f/var/run/rsyncd.pid && rsync--daemonfi

  

First execution: [[email protected] d4]# sh-x rsync_start_restart.sh restart+ ' [' Restart = Restart '] ' + ' ['-f/var/run/rsyncd.pid  '] ' +/bin/rm-f/var/run/rsyncd.pid+ rsync--daemon Second execution [[email protected] d4]# sh-x rsync_start_restart.sh restart+ ' [' Restart = = Restart '] ' + ' ['-f/var/run/rsyncd.pid '] ' + + cat/var/run/rsyncd.pid+ kill 3455+/bin/rm-f/VAR/RUN/RSYNCD.P id+ rsync--daemon

Question point: I do not know why the second execution obviously saw the rsync--daemon execution, but rsync is not up. Is it a logical mistake to think about it for a long time?

rsync start Stop Script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.