Skip to content

Commit

Permalink
Fix syntax error in script
Browse files Browse the repository at this point in the history
  • Loading branch information
cailafinn committed Sep 24, 2024
1 parent 6972988 commit cd3d33b
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#! /bin/sh
#! /bin/bash

SERVER_IP=${1}

RSYNC_PROCESS_IDS=$(pidof rsync)

if [[ -z $RSYNC_PROCESS_IDS ]]; then
printf "%(%H:%M:%S)T "

if [ -z "${RSYNC_PROCESS_IDS}" ]; then
echo "running rsync..."
rsync -az --perms -o -g $SERVER_IP:/srv/$SERVER_IP/ftp/external-data/MD5/ /external-data/MD5/
else
echo "rsync is already running. Skipping this time..."
Expand Down

0 comments on commit cd3d33b

Please sign in to comment.