aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ftphelper.c2
-rwxr-xr-xsrc/ftpupload3
-rw-r--r--src/modbuslog.cfg7
-rw-r--r--src/modbuslog_all.cfg7
-rw-r--r--src/modbuslog_pulse.cfg7
-rw-r--r--src/modbuslog_ws.cfg7
-rw-r--r--src/modbuslog_wsgps.cfg7
7 files changed, 3 insertions, 37 deletions
diff --git a/src/ftphelper.c b/src/ftphelper.c
index 69527db..889b9c5 100644
--- a/src/ftphelper.c
+++ b/src/ftphelper.c
@@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
return 0;
}
- const char *configfile = "/etc/modbuslog.cfg";
+ const char *configfile = "/etc/ftpupload.cfg";
config_t cfg;
const char *ftp_server;
const char *ftp_username;
diff --git a/src/ftpupload b/src/ftpupload
index 7c612d5..f02e269 100755
--- a/src/ftpupload
+++ b/src/ftpupload
@@ -7,7 +7,8 @@
USERNAME=`/usr/bin/ftphelper --username`
PASSWORD=`/usr/bin/ftphelper --password`
SERVER=`/usr/bin/ftphelper --server`
-LOCALDIRECTORY="/var/modbuslog"
+# default to modbuslog if unset
+LOCALDIRECTORY="/var/${UPLOADTYPE-modbuslog}"
REMOTEDIRECTORY=`/usr/bin/ftphelper --directory`
# current file to be uploaded
diff --git a/src/modbuslog.cfg b/src/modbuslog.cfg
index 9c23660..75f29eb 100644
--- a/src/modbuslog.cfg
+++ b/src/modbuslog.cfg
@@ -11,13 +11,6 @@ modbus = {
retry = 2;
};
-ftp = {
- server = "ftp.verteco.ie";
- username = "loggerdevice";
- password = "securepassword";
- directory = ".";
-};
-
reading= (
{
# digirail series number
diff --git a/src/modbuslog_all.cfg b/src/modbuslog_all.cfg
index 9c23660..75f29eb 100644
--- a/src/modbuslog_all.cfg
+++ b/src/modbuslog_all.cfg
@@ -11,13 +11,6 @@ modbus = {
retry = 2;
};
-ftp = {
- server = "ftp.verteco.ie";
- username = "loggerdevice";
- password = "securepassword";
- directory = ".";
-};
-
reading= (
{
# digirail series number
diff --git a/src/modbuslog_pulse.cfg b/src/modbuslog_pulse.cfg
index 05377a9..e628bc2 100644
--- a/src/modbuslog_pulse.cfg
+++ b/src/modbuslog_pulse.cfg
@@ -11,13 +11,6 @@ modbus = {
retry = 2;
};
-ftp = {
- server = "ftp.verteco.ie";
- username = "loggerdevice";
- password = "securepassword";
- directory = ".";
-};
-
reading= (
{
# digirail series number
diff --git a/src/modbuslog_ws.cfg b/src/modbuslog_ws.cfg
index 9d0d8e6..97b033e 100644
--- a/src/modbuslog_ws.cfg
+++ b/src/modbuslog_ws.cfg
@@ -11,13 +11,6 @@ modbus = {
retry = 2;
};
-ftp = {
- server = "ftp.verteco.ie";
- username = "loggerdevice";
- password = "securepassword";
- directory = ".";
-};
-
reading= (
{
# digirail series number
diff --git a/src/modbuslog_wsgps.cfg b/src/modbuslog_wsgps.cfg
index 0dbf5a4..2022da4 100644
--- a/src/modbuslog_wsgps.cfg
+++ b/src/modbuslog_wsgps.cfg
@@ -11,13 +11,6 @@ modbus = {
retry = 2;
};
-ftp = {
- server = "ftp.verteco.ie";
- username = "loggerdevice";
- password = "securepassword";
- directory = ".";
-};
-
reading= (
{