Commit Graph

42 Commits (445bc41d0efd39991ff2d5435e28bca245763190)

Author SHA1 Message Date
Paulo Truta 445bc41d0e Fixes to install make command, fixes to local network app url definition, run ws build on start and every 24 hours 2023-10-28 18:43:18 +02:00
= 8bf26a334c Added system.CopyDir and EdgeappsBackupPath conf 2023-06-10 17:29:54 +02:00
Paulo Truta 284acb18a4 Added restore functionality 2023-05-31 00:03:23 +00:00
Paulo Truta 8d0de36cdd Removed err from log 2023-05-30 21:25:40 +02:00
Paulo Truta 113785def4 Using Sprintf to convert from int64 to string of digits 2023-05-30 21:23:33 +02:00
Paulo Truta df13bf705d Removed formatting directive from Println call 2023-05-30 21:22:31 +02:00
Paulo Truta 04cdba7479 Run next backup based on time elapsed since last backup record 2023-05-30 20:38:06 +02:00
Paulo Truta a66ff40e65 Backups feature 2023-05-29 21:52:27 +02:00
Paulo Truta ece500c342
Cloudflare Tunnel Support (#29)
* Adding necessary changes for tunnel setup supporting cloudflared

* Applied shwrap pattern to login, create and delete tunnel actions, many fixes

* Refactoring sesh 1

* Added utils, remaining tunnel tasks, cleanup
2023-03-20 00:54:42 +01:00
Malachi Soord 0680b7ffb9
GetPath improvements (#20)
* Use named variables for getting path
Fixed bug with env var

* Fix test

* Use utils to get paths
2022-10-08 18:41:37 +02:00
Paulo Truta 83d2fdcae1
[WIP] Support for cloud version (#17)
* Added build-cloud to Makefile

* Fix env var key GOOS

* Added taskSetReleaseVersion for edgeboxctl version option write into DB

* taskGetSystemUptime to run every 5 ticks

* Added support for detecting main disk in cloud version

* Added missing import

* Finding main device in test

* Refactored GetDevices and test to use release_version

* Added utils.getIP function, set to run as a 60 tick scheduled task

* Added taskEnablePublicDashboard and taskDisablePublicDashboard

* Added utils.WriteOption and refactor, added enablePublicDashb0oard

* Finalizing online support for dashboard, cloud version support

* Added task SetupCloudOptions

* Added couple of func description comments

* Early return statement (thanks @inverse)

* Using IsPublicDashboard in DisablePublicDashboard func

* Added constants for release version and device types, added diagnostics.GetReleaseVersion

* Removed codecov from test action
2022-02-06 15:37:50 +01:00
Malachi Soord 7430f0c8ce
Use const for task status (#18) 2021-06-17 21:48:15 +02:00
Paulo Truta 9339e6cf09
Storage Module Basis (#13)
* Added storage module, base structs, getDevices() func, taskGetStorageDevices (ticks every 30)

* GetDevices now returns a complete description w/ disk partitions

* Added InUse flag to Device, fixed logic bugs

* Added disk space usage for partitions in use by the system

* Cleanup

* Added UsageStat and UsageSplit filling for in use devices

* Changed value of lsblk block usage output to bytes

* Cleanup, small fixes

* Added ExecAndGetLines util func

* Added explicit detection of disk or part block type, ignoring non-suppoorted devices

* Added command line tool dependencies for the project in README file

* Added comment to func ExecAndGetLines

* Removed GetMySQLDbConnectionDetails()

* Added tests to utils module

* Fix invalid argument type for Exec family of tests

* Removed too much verbosity from utils.GetPath when no env file is available, added new argument (path) to Exec family of funcs

* Added new path argument to utils.Exec... test

* Fixed TestExec

* Added spaces trim to Exec result

* Trimming spaces and newlines from result of Exec

* Better visibility for test result log of TestExec

* Added ExampleExecAndStream test

* Added Example tests with failure status for ExecAndStream

* Added branch to test for valid key in GetPath

* Added missing t.Fail() statements in utils_test.go

* Added storage_test.go file, smoke test

* TestGetDevices
2021-06-13 12:03:36 +02:00
Paulo Truta 1736b04a66 Query contains named columns 2021-06-01 23:53:17 +00:00
Paulo Truta df3f8fe904 Added system module, GetUptimeSeconds and GetUptimeFormatted funcs, taskGetSystemUptime 2021-05-31 11:21:14 +00:00
Paulo Truta 770e814b6e Fixed Datetime column values. Added utils.GetSQLiteFormattedDateTime def 2021-05-30 11:28:42 +00:00
Paulo Truta 9f63ab7f03 Support for nullable Task args 2021-05-19 10:43:47 +00:00
Paulo Truta 58b7425fc7 Fixed incorrect query prepare statement, small fixes in queries 2021-05-08 20:46:36 +00:00
Paulo Truta f238b3fa46 Write queries using prepared statements, better error handling 2021-05-08 20:42:07 +00:00
Paulo Truta 6cb3e198f0 Supporting connection to SQLite database 2021-05-02 08:52:32 +00:00
Paulo Truta 74cbff1966 Stopping edgeapp before removing 2021-03-04 15:53:49 +00:00
Paulo Truta 11e9543a87 Added install / remove edgeapp tasks 2021-03-04 15:06:54 +00:00
Paulo Truta 0ed5297f6d Renaming everything to edgeboxctl 2021-03-04 12:43:49 +00:00
Paulo Truta 5e81525635 Fixes with .env file handling and other misc 2021-02-20 18:09:41 +00:00
Paulo Truta 7857985fe4 Added full support for enable_online and disable_online tasks 2021-02-20 14:26:23 +00:00
Paulo Truta 6c0b011e51 Removed unnused variable assignment and unecessary for loop 2021-02-19 00:32:37 +00:00
Paulo Truta 3cc670b823 Implemented actual tested RunEdgeApp and StopEdgeApp commands, added sleep time after container operation and before checking status 2021-02-18 22:59:14 +00:00
Paulo Truta 0bd61ccf75 Tidy up (less verbosity), actual DB update for EDGEAPPS_LIST 2021-02-17 13:34:53 +01:00
Paulo Truta 59707b8abd Fixed small typo, replaced DB connection details in Makefile by .env loading 2021-02-17 12:10:15 +01:00
Paulo Truta 5a97caacff Added various functions to edgeapps package, working GetEdgeApps func running as scheduled task 2021-02-17 01:08:10 +01:00
Paulo Truta fc5b342c89 Removed mods (thanks @inverse) 2021-02-16 22:08:59 +01:00
Paulo Truta 97182602c4 Added package edgeapps 2021-02-16 17:30:01 +01:00
Paulo Truta ad28e1a505 Added edgeapps package, cleaned up redundancies 2021-02-15 20:37:16 +01:00
Paulo Truta 9f20211bf4 Introduced tick counter and ExecuteSchedules for execution of recurrent no argument tasks 2021-02-15 18:14:46 +00:00
Paulo Truta 50ad33ac33 removed spaces 2021-02-15 09:55:09 +01:00
Paulo Truta 1e9be94851 Various improvements and developments to tasks execution logic 2021-02-14 04:22:08 +00:00
Paulo Truta 461a9e6558 Replaced fmt with log calls 2021-02-14 03:50:21 +01:00
Paulo Truta d7aabfdbe8 Added NodeName as element of tasSetupBootnodeArgs struct. Usage in taskSetupBootnode 2021-02-14 02:28:13 +01:00
Paulo Truta db3b31091e Reading json arguments for task running, setup_bootnode task, don't run actual commands for dev release 2021-02-14 01:04:50 +01:00
Paulo Truta 47df72777b Added base task execution algo 2021-02-13 21:49:09 +01:00
Paulo Truta 4bb060ba5f Laying out the structure of the Tasks package, and how it will be called in the systemIterator in main 2021-02-13 17:04:57 +01:00
Paulo Truta 8845cb11de Renamed module database into tasks 2021-02-13 16:06:13 +01:00