1
0
mirror of https://github.com/IceWhaleTech/CasaOS.git synced 2025-07-12 23:50:14 +02:00

fixed bug

This commit is contained in:
link
2021-12-01 16:25:56 +08:00
parent 049090444e
commit 956328da86
9 changed files with 35 additions and 11 deletions

View File

@ -96,7 +96,7 @@ func installSyncthing(appId string) {
m.Origin = "system"
m.PortMap = appInfo.PortMap
m.Ports = appInfo.Ports
m.Restart = ""
m.Restart = "always"
m.Volumes = appInfo.Volumes
containerId, err := service.MyService.Docker().DockerContainerCreate(dockerImage+":"+dockerImageVersion, id, m, appInfo.NetworkModel)
@ -156,6 +156,10 @@ func checkSystemApp() {
list := service.MyService.App().GetSystemAppList()
for _, v := range *list {
if v.Image == "linuxserver/syncthing" {
if v.State != "running" {
//step:start container
service.MyService.Docker().DockerContainerStart(v.CustomId)
}
syncIsExistence = true
if config.SystemConfigInfo.SyncPort != v.Port {
config.SystemConfigInfo.SyncPort = v.Port