From 73011c3593690e4b73718048bd8c58fa14868834 Mon Sep 17 00:00:00 2001 From: Amber Date: Thu, 10 Jun 2021 14:19:57 +0200 Subject: [PATCH] help --- syncdir.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/syncdir.sh b/syncdir.sh index 5cd9c9a..8d47d66 100755 --- a/syncdir.sh +++ b/syncdir.sh @@ -14,8 +14,7 @@ HELP_LOCAL_DIR="/home/$USER/localsync/" HELP_REMOTE_DIR="remoteuser@server:/home/remoteuser/sync/" myhelp() { - echo 'Synopsis: ' - echo -e "\t ${HELP_CMD_NAME} {COMMAND} [OPTION]" + echo "Usage: ${HELP_CMD_NAME} {COMMAND} [OPTION]" echo 'Description: ' echo -e '\tThis tool allows you to mirror and keep synchronised a folder on a remote server with an arbitrary local folder.' echo -e '\tIt has three main commands init, start, stop, remove' @@ -23,11 +22,6 @@ myhelp() { echo -e "\tthe typical use is to start a sync with the command" echo -e "\t\t${HELP_CMD_NAME} init -l ${HELP_LOCAL_DIR} -r ${HELP_REMOTE_DIR}" echo -e "\tAbove command starts to mirror and sync the local folder ${HELP_LOCAL_DIR} with the remote folder ${HELP_REMOTE_DIR}" - #'rsync -aP -e ssh /home/luca/googleDrive/Copy/Appunti/ notanamber@myvps:/home/notanamber/sydir' -} - -timestamp() { - $(date +%s) } hastrailingslash() { @@ -52,7 +46,6 @@ syncexists() { initsyncpath() { echo 'Starting initial sync...' - #rsync -aP -e ssh "$remotepath" "$localpath" ## write the file with remotepath and localpath for future use localpath_hash=$(echo "$1" | md5sum | cut -f1 --delimiter=" " -) sync $localpath_hash $2 $1 @@ -64,12 +57,10 @@ initsyncpath() { startsyncpath() { echo 'Starting sync...' - #rsync -aP -e ssh "$remotepath" "$localpath" ## write the file with remotepath and localpath for future use localpath_hash=$(echo "$1" | md5sum | cut -f1 --delimiter=" " -) sync $localpath_hash $2 $1 ## create sync with status stopped -> after this start the loop - #echo $localpath_hash "p$MYPID" w$(date +%s) $STATUS_STOPPED $1 $2 >> ${SYNCFILE} loopsyncpath $1 }