v2 #2

Merged
shoopea merged 29 commits from v2 into master 2023-08-21 20:03:11 +02:00
3 changed files with 12 additions and 6 deletions
Showing only changes of commit c72f903e31 - Show all commits

View File

@ -67,6 +67,13 @@ func (a *AdminConfig) Run() {
}) })
}) })
r.GET("/run", func(c *gin.Context) {
cfg.Run()
c.JSON(http.StatusOK, gin.H{
"message": "done",
})
})
srv := &http.Server{ srv := &http.Server{
Addr: a.Addr, Addr: a.Addr,
Handler: r, Handler: r,

View File

@ -9,13 +9,12 @@ import (
) )
var ( var (
cfgFile = flag.String("config", "config.json", "config file") cfgFile = flag.String("config", "backup.json", "config file")
isDaemon = flag.Bool("daemon", false, "run as daemon") isDaemon = flag.Bool("daemon", false, "run as daemon")
debug = flag.Bool("debug", false, "log debug messages") debug = flag.Bool("debug", false, "log debug messages")
quiet = flag.Bool("quiet", false, "remove most log messages") quiet = flag.Bool("quiet", false, "remove most log messages")
logFile = flag.String("logfile", "", "log file") logFile = flag.String("logfile", "", "log file")
cfg Config cfg Config
email *Email
) )
func main() { func main() {

View File

@ -1,7 +1,7 @@
// Code generated by version.sh (@generated) DO NOT EDIT. // Code generated by version.sh (@generated) DO NOT EDIT.
package main package main
var githash = "ca3d817" var githash = "f6fdd83"
var branch = "v2" var branch = "v2"
var buildstamp = "2023-07-31_16:19:11" var buildstamp = "2023-07-31_18:47:13"
var commits = "75" var commits = "76"
var version = "ca3d817-b75 - 2023-07-31_16:19:11" var version = "f6fdd83-b76 - 2023-07-31_18:47:13"