mirror of
https://github.com/azukaar/Cosmos-Server.git
synced 2026-01-05 20:05:02 -06:00
[release] v0.9.0-unstable3
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.9.0-unstable2",
|
||||
"version": "0.9.0-unstable3",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
||||
15
src/CRON.go
15
src/CRON.go
@@ -118,15 +118,10 @@ func checkCerts() {
|
||||
|
||||
func CRON() {
|
||||
go func() {
|
||||
gocron.Every(1).Day().At("00:00").Do(checkVersion)
|
||||
<-gocron.Start()
|
||||
}()
|
||||
go func() {
|
||||
gocron.Every(1).Day().At("01:00").Do(checkCerts)
|
||||
<-gocron.Start()
|
||||
}()
|
||||
go func() {
|
||||
gocron.Every(6).Hours().Do(checkUpdatesAvailable)
|
||||
<-gocron.Start()
|
||||
s := gocron.NewScheduler()
|
||||
s.Every(1).Day().At("00:00").Do(checkVersion)
|
||||
s.Every(1).Day().At("01:00").Do(checkCerts)
|
||||
s.Every(6).Hours().Do(checkUpdatesAvailable)
|
||||
s.Start()
|
||||
}()
|
||||
}
|
||||
@@ -707,7 +707,7 @@ func CreateService(serviceRequest DockerServiceCreateRequest, OnLog func(string)
|
||||
// Save the route configs
|
||||
config.HTTPConfig.ProxyConfig.Routes = configRoutes
|
||||
utils.SaveConfigTofile(config)
|
||||
utils.NeedsRestart = true
|
||||
utils.RestartHTTPServer()
|
||||
|
||||
// After all operations
|
||||
utils.Log("CreateService: Operation succeeded. SERVICE STARTED")
|
||||
|
||||
@@ -365,7 +365,7 @@ func InitServer() *mux.Router {
|
||||
router = proxy.BuildFromConfig(router, HTTPConfig.ProxyConfig)
|
||||
|
||||
router.HandleFunc("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, "/cosmos-ui", http.StatusMovedPermanently)
|
||||
http.Redirect(w, r, "/cosmos-ui", http.StatusTemporaryRedirect)
|
||||
}))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user