Skip to content

Commit

Permalink
Bug with the config file
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Dec 1, 2013
1 parent 3c8a748 commit 6a7991d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Before running the script, you must change some vars in the config file ``ftp-sy
* **EMAIL_LOG** - Mail address where the logs are sent. Leave empty to disable sending mail.
* **PID_FILE** - Path to the file containing the current PID of the process.

If you change the location of the config file, do not forget to change the path in the ftp-sync script file for the CONFIG_FILE var (default /etc/init.d/ftp-sync.conf).

## Usage

``$ /etc/init.d/ftp-sync <DIR_DEST>``
Expand Down
8 changes: 4 additions & 4 deletions ftp-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

##################################################################################
# #
# FTP Sync v1.91 #
# FTP Sync v1.92 #
# #
# A shell script to synchronize files between a remote FTP server and #
# your local server/computer. #
Expand Down Expand Up @@ -42,7 +42,7 @@
# #
##################################################################################

CONFIG_FILE="ftp-sync.conf"
CONFIG_FILE="/etc/init.d/ftp-sync.conf"

# No edits necessary beyond this line

Expand Down Expand Up @@ -313,7 +313,7 @@ SCRIPT_NAME=$(basename "$0")
# Read config file
if [ ! -f "$CONFIG_FILE" ]
then
ftpsyncEcho "ERROR: Config file $CONFIG_FILE not found..."
echo "ERROR: Config file $CONFIG_FILE not found..."
exit 1
else
source "$CONFIG_FILE"
Expand All @@ -339,7 +339,7 @@ if [ ! -d "$DIR_LOGS" ]; then mkdir -p "$DIR_LOGS"; fi
LOG_FILE="$DIR_LOGS/ftp-sync-`date +%Y%m%d%H%M%S`.log"
touch "$LOG_FILE"

ftpsyncEcho "FTP Sync v1.91 (`date +"%Y/%m/%d %H:%M:%S"`)"
ftpsyncEcho "FTP Sync v1.92 (`date +"%Y/%m/%d %H:%M:%S"`)"
ftpsyncEcho "--------------"

# Check required packages
Expand Down

0 comments on commit 6a7991d

Please sign in to comment.