diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f738181 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright [2024] [Daniel Legt] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/README.md b/README.md index c2832be..11e7e0d 100644 --- a/README.md +++ b/README.md @@ -44,4 +44,12 @@ WantedBy=multi-user.target Currently the program does not depend on any hardware library as I couldn't find anything that would not require root access while giving me the possibility to interrogate the temperature of the drives, I chose not to depend on `lsblk` either, so how does the program work? Well it looks in `/sys/block` and simply ### Why not just run as root? -I really, really, **really** want to avoid asking people to run **ANY** program I write as root and even try and prevent that from happening since that's how things can go bad, especially because I am runnig actions over hardware items. I think you can see how easy it is for a mistake or a **malicious attack** to easily deal damage \ No newline at end of file +I really, really, **really** want to avoid asking people to run **ANY** program I write as root and even try and prevent that from happening since that's how things can go bad, especially because I am runnig actions over hardware items. I think you can see how easy it is for a mistake or a **malicious attack** to easily deal damage + +## Support & Contribution + +For support, bug reports, or feature requests, please open an issue on the [GitHub repository](https://github.com/JustKato/drive-health/issues). Contributions are welcome! Fork the repository, make your changes, and submit a pull request. + +## License + +This project is licensed under the [Apache License 2.0](./LICENSE). \ No newline at end of file diff --git a/go.mod b/go.mod index 3f50cf4..e45c300 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module tea.chunkbyte.com/kato/drive-health +module github.com/JustKato/drive-health go 1.21.6 diff --git a/lib/hardware/logic.go b/lib/hardware/logic.go index ad5a12c..afad9b1 100644 --- a/lib/hardware/logic.go +++ b/lib/hardware/logic.go @@ -8,8 +8,8 @@ import ( "strings" "time" + "github.com/JustKato/drive-health/lib/config" "gorm.io/gorm" - "tea.chunkbyte.com/kato/drive-health/lib/config" ) func GetSystemHardDrives(db *gorm.DB, olderThan *time.Time, newerThan *time.Time) ([]*HardDrive, error) { diff --git a/lib/svc/service.go b/lib/svc/service.go index 09e23a1..3c4c76c 100644 --- a/lib/svc/service.go +++ b/lib/svc/service.go @@ -5,11 +5,11 @@ import ( "fmt" "time" + "github.com/JustKato/drive-health/lib/config" + "github.com/JustKato/drive-health/lib/hardware" "github.com/wcharczuk/go-chart/v2" "gorm.io/driver/sqlite" "gorm.io/gorm" - "tea.chunkbyte.com/kato/drive-health/lib/config" - "tea.chunkbyte.com/kato/drive-health/lib/hardware" ) var db *gorm.DB diff --git a/lib/svc/service_cleanup.go b/lib/svc/service_cleanup.go index 0e96801..79261ac 100644 --- a/lib/svc/service_cleanup.go +++ b/lib/svc/service_cleanup.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "tea.chunkbyte.com/kato/drive-health/lib/config" - "tea.chunkbyte.com/kato/drive-health/lib/hardware" + "github.com/JustKato/drive-health/lib/config" + "github.com/JustKato/drive-health/lib/hardware" ) // Delete all thermal entries that are older than X amount of seconds diff --git a/lib/web/api.go b/lib/web/api.go index ac847cb..fd506b1 100644 --- a/lib/web/api.go +++ b/lib/web/api.go @@ -5,9 +5,9 @@ import ( "strconv" "time" + "github.com/JustKato/drive-health/lib/hardware" + "github.com/JustKato/drive-health/lib/svc" "github.com/gin-gonic/gin" - "tea.chunkbyte.com/kato/drive-health/lib/hardware" - "tea.chunkbyte.com/kato/drive-health/lib/svc" ) func setupApi(r *gin.Engine) { diff --git a/lib/web/frontend.go b/lib/web/frontend.go index 4454001..f0f65cf 100644 --- a/lib/web/frontend.go +++ b/lib/web/frontend.go @@ -6,9 +6,9 @@ import ( "strconv" "time" + "github.com/JustKato/drive-health/lib/hardware" + "github.com/JustKato/drive-health/lib/svc" "github.com/gin-gonic/gin" - "tea.chunkbyte.com/kato/drive-health/lib/hardware" - "tea.chunkbyte.com/kato/drive-health/lib/svc" ) func setupFrontend(r *gin.Engine) { diff --git a/lib/web/net.go b/lib/web/net.go index ef1b1cb..5e667d9 100644 --- a/lib/web/net.go +++ b/lib/web/net.go @@ -1,8 +1,8 @@ package web import ( + "github.com/JustKato/drive-health/lib/config" "github.com/gin-gonic/gin" - "tea.chunkbyte.com/kato/drive-health/lib/config" ) func SetupRouter() *gin.Engine { diff --git a/main.go b/main.go index d7c5b26..886aeaa 100644 --- a/main.go +++ b/main.go @@ -9,10 +9,10 @@ import ( "syscall" "time" + "github.com/JustKato/drive-health/lib/config" + "github.com/JustKato/drive-health/lib/svc" + "github.com/JustKato/drive-health/lib/web" "github.com/joho/godotenv" - "tea.chunkbyte.com/kato/drive-health/lib/config" - "tea.chunkbyte.com/kato/drive-health/lib/svc" - "tea.chunkbyte.com/kato/drive-health/lib/web" ) func main() {