Due to circumstances beyond my control, I can no longer ftp from CumulusMX to my Internet website. Network congestion is causing all ftp connection attempts to timeout
I can however use ssh/scp to copy the necessary files.
I can call a script from CumulusMX to do the ssh/scp copy but if I don't have ftp enabled in CumulusMX, the various web files do not get updated form the templates (true?)
Is there a way to have the various .htm files and .json files etc. updated without having ftp enabled?
This problem is likely to exist until the end of May so I don't mind putting in some effort to fix this.
Regards
Geoff
Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
scp instead of ftp
Moderator: mcrossley
-
- Posts: 154
- Joined: Thu 11 Mar 2010 11:03 am
- Weather Station: WH1081
- Operating System: Linux, Raspberry Pi (Wheezy)
- Location: Port Huon, Tasmania , Australia
- Contact:
- steve
- Cumulus Author
- Posts: 26702
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: scp instead of ftp
MX processes templates and creates the json files without requiring ftp to be configured. To disable ftp, just set it up as normal but don't supply an ftp host.
Steve
-
- Posts: 154
- Joined: Thu 11 Mar 2010 11:03 am
- Weather Station: WH1081
- Operating System: Linux, Raspberry Pi (Wheezy)
- Location: Port Huon, Tasmania , Australia
- Contact:
Re: scp instead of ftp
Thanks Steve,
I did try deleting all of the ftp info but got an error message. Just tried with the host blank and it isn't complaining.
Another question on the same/related subject. I need to run a script to perform the scp. I've entered the name of this script into the External Program section under Internet Settings but it's either not being run or isn't doing the job. If I run the script as root, it works fine. I've tried this using just the script file-name and also with a full pathname.
Is the script run before or after the ftp transfer/file processing takes place?
Regards
GEoff
I did try deleting all of the ftp info but got an error message. Just tried with the host blank and it isn't complaining.
Another question on the same/related subject. I need to run a script to perform the scp. I've entered the name of this script into the External Program section under Internet Settings but it's either not being run or isn't doing the job. If I run the script as root, it works fine. I've tried this using just the script file-name and also with a full pathname.
Is the script run before or after the ftp transfer/file processing takes place?
Regards
GEoff
- steve
- Cumulus Author
- Posts: 26702
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: scp instead of ftp
If you turn on debug logging, the diags file will contain a message if/when it starts the command (one message before and one after starting), and any error will be logged (even without debug logging). Sometimes the command can fail in such a way that MX doesn't get told, though.
The command is executed after file processing and before FTP.
The command is executed after file processing and before FTP.
Steve
-
- Posts: 154
- Joined: Thu 11 Mar 2010 11:03 am
- Weather Station: WH1081
- Operating System: Linux, Raspberry Pi (Wheezy)
- Location: Port Huon, Tasmania , Australia
- Contact:
Re: scp instead of ftp
Logging is on, ftp host is set to null and the files are correctly processed.
The log tells me that the external program has been run but it doesn't appear to be.
The program is as basic as I can make it, list is a file with the names of the files to transfer. Program parameters is set to 'testing'
Running the script as either the weather user or root works as expected.
Any other debugging I can try?
The log tells me that the external program has been run but it doesn't appear to be.
Code: Select all
2016-03-12 23:20:02.870 Executing program /home/weather/CumulusMX/weather_copy.sh testing
2016-03-12 23:20:02.887 External program started
Code: Select all
scp -P 2783 `cat list` user@port-huon.com.au:~/hub/weather
echo $1 >>/tmp/logg
Any other debugging I can try?
- mcrossley
- Posts: 12695
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: scp instead of ftp
Try your echo as the first line of the script. I have MX running a shell script, daily rather than at update, but it works fine...
You do not have the required permissions to view the files attached to this post.
-
- Posts: 154
- Joined: Thu 11 Mar 2010 11:03 am
- Weather Station: WH1081
- Operating System: Linux, Raspberry Pi (Wheezy)
- Location: Port Huon, Tasmania , Australia
- Contact:
Re: scp instead of ftp
Thanks Mark, I'll make that change and see what happens.
EDIT: No change, still no output from program. FWIW, I'm running CumulusMX 3036
Regards
GEoff
EDIT: No change, still no output from program. FWIW, I'm running CumulusMX 3036
Regards
GEoff
-
- Posts: 154
- Joined: Thu 11 Mar 2010 11:03 am
- Weather Station: WH1081
- Operating System: Linux, Raspberry Pi (Wheezy)
- Location: Port Huon, Tasmania , Australia
- Contact:
Re: scp instead of ftp
Doh!
I can't believe it, I forgot to put the magic #!/bin/sh as the first line of the shell script!
Script now works as expected and data is being uploaded to my web pages.
I can't believe it, I forgot to put the magic #!/bin/sh as the first line of the shell script!
Script now works as expected and data is being uploaded to my web pages.