Skip to content

Commit

Permalink
Fix ftp and filename issues in upload script
Browse files Browse the repository at this point in the history
The uploadForDay script had the following issues

1) Does not include the ftp settings so could never connect
2) The file extension was hard coded to .jpg
  • Loading branch information
Alex authored and thomasjacquin committed Oct 28, 2020
1 parent 6a49329 commit b0ebc46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/uploadForDay.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
source $ALLSKY_HOME/config.sh
source $ALLSKY_HOME/scripts/filename.sh
source $ALLSKY_HOME/scripts/ftp-settings.sh

cd $ALLSKY_HOME/scripts

Expand All @@ -17,13 +18,13 @@ fi

# Upload keogram
echo -e "Uploading Keogram\n"
KEOGRAM="$ALLSKY_HOME/images/$1/keogram/keogram-$1.jpg"
KEOGRAM="$ALLSKY_HOME/images/$1/keogram/keogram-$1.$EXTENSION"
lftp "$PROTOCOL"://"$USER":"$PASSWORD"@"$HOST":"$KEOGRAM_DIR" -e "set net:max-retries 1; put $KEOGRAM; bye" -u "$USER","$PASSWORD"
echo -e "\n"

# Upload Startrails
echo -e "Uploading Startrails\n"
STARTRAILS="$ALLSKY_HOME/images/$1/startrails/startrails-$1.jpg"
STARTRAILS="$ALLSKY_HOME/images/$1/startrails/startrails-$1.$EXTENSION"
lftp "$PROTOCOL"://"$USER":"$PASSWORD"@"$HOST":"$STARTRAILS_DIR" -e "set net:max-retries 1; put $STARTRAILS; bye"
echo -e "\n"

Expand Down

0 comments on commit b0ebc46

Please sign in to comment.