some fixes
This commit is contained in:
parent
ca8825dcd7
commit
7aaf2acab4
3
.github/workflows/build_all.yml
vendored
3
.github/workflows/build_all.yml
vendored
@ -60,6 +60,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: minecraft-launcher-server
|
name: minecraft-launcher-server
|
||||||
|
|
||||||
|
- name: chmod
|
||||||
|
run: chmod +x minecraft-launcher-server
|
||||||
|
|
||||||
- name: Prepare ssh
|
- name: Prepare ssh
|
||||||
env:
|
env:
|
||||||
SSH_FINGERPRINT: ${{secrets.SSH_FINGERPRINT}}
|
SSH_FINGERPRINT: ${{secrets.SSH_FINGERPRINT}}
|
||||||
|
|||||||
@ -38,7 +38,8 @@ static class Server
|
|||||||
Config = ServerConfig.LoadOrCreateDefault();
|
Config = ServerConfig.LoadOrCreateDefault();
|
||||||
|
|
||||||
CheckUpdates();
|
CheckUpdates();
|
||||||
updateCheckTimer = new Timer(true, 5 * 60 * 1000, CheckUpdates);
|
// check for updates every minute
|
||||||
|
updateCheckTimer = new Timer(true, 60 * 1000, CheckUpdates);
|
||||||
updateCheckTimer.Start();
|
updateCheckTimer.Start();
|
||||||
|
|
||||||
|
|
||||||
@ -89,7 +90,9 @@ static class Server
|
|||||||
File.Move(exeFileNew, exeFile, true);
|
File.Move(exeFileNew, exeFile, true);
|
||||||
Environment.Exit(0);
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
else File.Move(updatedFilePath, relativeFilePath, true);
|
|
||||||
|
logger.LogDebug(nameof(CheckUpdates), "updating file "+relativeFilePath);
|
||||||
|
File.Move(updatedFilePath, relativeFilePath, true);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@ -97,9 +100,12 @@ static class Server
|
|||||||
+ e.ToStringDemystified());
|
+ e.ToStringDemystified());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.LogInfo(nameof(CheckUpdates), "creating manifests...");
|
if(updatedFiles.Count != 0)
|
||||||
Manifests.CreateAllManifests();
|
{
|
||||||
logger.LogInfo(nameof(CheckUpdates), "manifests created");
|
logger.LogInfo(nameof(CheckUpdates), "creating manifests...");
|
||||||
|
Manifests.CreateAllManifests();
|
||||||
|
logger.LogInfo(nameof(CheckUpdates), "manifests created");
|
||||||
|
}
|
||||||
logger.LogInfo(nameof(CheckUpdates), "update check completed");
|
logger.LogInfo(nameof(CheckUpdates), "update check completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user