-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public web site #866
Comments
There is no automated way, as from what I know. But you can copy the images from |
That would be fantastic. Thanks for the offer. |
Sorry it took so long, I didnt have the time. But now, here is the guide: 1. Installing the scriptFirst things first, change the directory to your home (or where you want the script to exist): cd /home/patrik You should, obviously, replace the username (mine is Patrik so...) Next, paste the script into a file, using NANO: nano uploader.sh it will open up a text editor, where you need to paste the following script: #!/bin/bash
#FTP credentials/details
FTP_SERVER="ftp_address_here (ftp.example.org)"
FTP_USERNAME="user_here"
FTP_PASSWORD="password_here"
#Local directory to upload
IMAGES_DIR="/srv/images"
REMOTE_DIR="/REPLACE_ME_WITH_YOUR_PATH_PLZ"
#Connect to FTP server
ftp -n $FTP_SERVER <<END_SCRIPT
quote USER $FTP_USERNAME
quote PASS $FTP_PASSWORD
cd $REMOTE_DIR
binary
lcd $IMAGES_DIR
mput *
quit
END_SCRIPT next, to exit and save nano, just press CTRL + X, then Y and finally enter to save (thanks, networkchuck) You also need to add a permission to this script, to be executable. That can be done with this: chmod +x uploader.sh Finally, you should install the FTP dependency, using this command (debian/ubuntu/rasbian OS assumed): sudo apt-get install ftp And we are finished. Just run this script and you are good to go. But it is not automatic, to make it automatic, there is the next chapter. 2. Making it automatic (optional)If you want to make this script run automatically, we´ll use crontab. crontab -e choose your editor of choice (I recommend nano, because it is the easiest) and add the following text to the bottom of the file:
Of course, you will need to change the user directory name (mine is Patrik) to yours. Or change the path to any path, where you installed the script in chapter 1. And you are good to go. To finalize, just restart your RPi with a simple command and the script should run every 24 hours, and automatically upload. sudo reboot I recommend running the script manually, to see if it works, to save you time and headaces. |
Is there a way to upload the raspberry-noaa local website to a public hosting site?
Mike
The text was updated successfully, but these errors were encountered: