This commit is contained in:
Thomas Peterson 2025-03-28 12:50:07 +01:00
parent 3e57fdc4b7
commit 6915845104
2 changed files with 78 additions and 97 deletions

View File

@ -12,99 +12,7 @@
<component name="ChangeListManager">
<list default="true" id="95257dc5-08bd-4c50-8726-85956b3c2c92" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.PSCHelpdesk/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.PSCHelpdesk/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/FastBill/FastBill.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/FastBill/FastBill.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/HetznerServer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/HetznerServer.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/HetznerServer.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/HetznerServer.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/Models/Server.cs" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/Models/Server.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/Service/ServerService.cs" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/Service/ServerService.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/ViewModels/ServerViewModel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/ViewModels/ServerViewModel.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/Views/ServerDetailView.axaml" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/Views/ServerDetailView.axaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HetznerServer/Views/ServerView.axaml" beforeDir="false" afterPath="$PROJECT_DIR$/HetznerServer/Views/ServerView.axaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Nextcloud/Nextcloud.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/Nextcloud/Nextcloud.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PSCHelpdesk.sln.DotSettings.user" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk.sln.DotSettings.user" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk.Desktop/PSCHelpdesk.Desktop.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk.Desktop/PSCHelpdesk.Desktop.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/PSCHelpdesk.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/PSCHelpdesk/PSCHelpdesk/PSCHelpdesk.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/PrintshopCreator/PrintshopCreator.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/PrintshopCreator/PrintshopCreator.csproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Base.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Controls.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.DesignerSupport.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Dialogs.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Markup.Xaml.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Markup.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Metal.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.MicroCom.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.OpenGL.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.ReactiveUI.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Remote.Protocol.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Vulkan.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Xaml.Interactions.Custom.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Xaml.Interactions.DragAndDrop.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Xaml.Interactions.Draggable.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Xaml.Interactions.Events.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Xaml.Interactions.Responsive.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Xaml.Interactions.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.Xaml.Interactivity.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Avalonia.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/DynamicData.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/HetznerCloudApi.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/HetznerServer.deps.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/HetznerServer.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/HetznerServer.pdb" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Material.Icons.Avalonia.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Material.Icons.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/MicroCom.Runtime.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Microsoft.Extensions.DependencyInjection.Abstractions.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Microsoft.Extensions.DependencyInjection.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Newtonsoft.Json.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/ReactiveUI.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Renci.SshNet.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/Splat.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/hetzner/System.Reactive.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Base.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Controls.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.DesignerSupport.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Dialogs.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Markup.Xaml.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Markup.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Metal.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.MicroCom.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.OpenGL.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.ReactiveUI.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Remote.Protocol.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Svg.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Vulkan.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Xaml.Interactions.Custom.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Xaml.Interactions.DragAndDrop.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Xaml.Interactions.Draggable.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Xaml.Interactions.Events.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Xaml.Interactions.Responsive.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Xaml.Interactions.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.Xaml.Interactivity.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Avalonia.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/AvaloniaEdit.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/ColorTextBlock.Avalonia.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/CommunityToolkit.Mvvm.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/DynamicData.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/ExCSS.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Fizzler.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/HtmlAgilityPack.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Markdown.Avalonia.Full.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Markdown.Avalonia.Html.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Markdown.Avalonia.Svg.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Markdown.Avalonia.SyntaxHigh.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Markdown.Avalonia.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/MicroCom.Runtime.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Newtonsoft.Json.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Nextcloud.deps.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Nextcloud.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Nextcloud.pdb" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/ReactiveUI.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/RestSharp.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/ShimSkiaSharp.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Splat.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Svg.Custom.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/Svg.Model.dll" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/_dist/nextcloud/System.Reactive.dll" beforeDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -284,7 +192,6 @@
<item itemvalue=".NET Project.PSCHelpdesk.Browser" />
<item itemvalue=".NET Project.PSCHelpdesk.Desktop" />
<item itemvalue=".NET Project.PSCHelpdesk.Desktop ohne plugin" />
<item itemvalue="Android.PSCHelpdesk.Android" />
<item itemvalue="iOS.PSCHelpdesk.iOS" />
</list>
</component>
@ -340,7 +247,26 @@
<workItem from="1734440327643" duration="505000" />
<workItem from="1734440840094" duration="1461000" />
<workItem from="1734512891958" duration="8348000" />
<workItem from="1734681339447" duration="16737000" />
<workItem from="1734681339447" duration="25455000" />
<workItem from="1735825667995" duration="6639000" />
<workItem from="1736012348049" duration="5675000" />
<workItem from="1736245173247" duration="1723000" />
<workItem from="1736268018760" duration="1279000" />
<workItem from="1736272969135" duration="16118000" />
<workItem from="1736861862450" duration="6203000" />
<workItem from="1737048851006" duration="14459000" />
<workItem from="1737537909704" duration="3401000" />
<workItem from="1737646873757" duration="1252000" />
<workItem from="1737728621993" duration="12485000" />
<workItem from="1737966490104" duration="1235000" />
<workItem from="1737998140424" duration="2999000" />
<workItem from="1738271984376" duration="325000" />
<workItem from="1738310654132" duration="13826000" />
<workItem from="1739349147095" duration="24038000" />
<workItem from="1739867474147" duration="39725000" />
<workItem from="1740569707006" duration="11324000" />
<workItem from="1741601215219" duration="1811000" />
<workItem from="1741876162867" duration="16308000" />
</task>
<task id="LOCAL-00001" summary="Backup">
<option name="closed" value="true" />
@ -398,7 +324,15 @@
<option name="project" value="LOCAL" />
<updated>1734120730780</updated>
</task>
<option name="localTasksCounter" value="8" />
<task id="LOCAL-00008" summary="Fixes">
<option name="closed" value="true" />
<created>1735121726198</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1735121726198</updated>
</task>
<option name="localTasksCounter" value="9" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -421,7 +355,8 @@
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
<MESSAGE value="backup" />
<MESSAGE value="Backup" />
<option name="LAST_COMMIT_MESSAGE" value="Backup" />
<MESSAGE value="Fixes" />
<option name="LAST_COMMIT_MESSAGE" value="Fixes" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>

View File

@ -118,7 +118,7 @@ public class ServerService: IServerService
try
{
client.Connect();
var command = client.RunCommand("apt upgrade -y && apt auto-remove -y");
var command = client.RunCommand("apt dist-upgrade -y && apt auto-remove -y");
if (command.ExitStatus == 0)
{
Console.WriteLine(serv.Name + " SUCCESS upgraded apt.");
@ -284,6 +284,52 @@ public class ServerService: IServerService
}
}
}
command = client.RunCommand("docker inspect psc-web-1");
if (command.ExitStatus == 0)
{
JArray web = JArray.Parse(command.Result);
var hostConfigArray = web[0]["HostConfig"];
if (hostConfigArray["RestartPolicy"]["Name"].ToString() == "always")
{
serv.IsRestartAlways = true;
}
var webEnvArray = web[0]["Config"]["Env"];
foreach (String entry in webEnvArray)
{
var webExploded = entry.Split("=");
if (webExploded[0] == "LETSENCRYPT_HOST")
{
var webHosts = webExploded[1].Split(",");
serv.Domains.Clear();
foreach (String dom in webHosts)
{
serv.Domains.Add(new Domain(dom));
}
var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Accept.Clear();
httpClient.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/ld+json"));
httpClient.DefaultRequestHeaders.Add("User-Agent", "PSC Client");
try
{
var stringTask = httpClient.GetStringAsync("https://" + webHosts[0] + "/apps/api/system/version");
var msg = await stringTask;
JObject versionMSg = JObject.Parse(msg);
serv.Datum = versionMSg["datum"].ToString();
serv.Release = float.Parse(versionMSg["release"].ToString());
}
catch (Exception ex)
{
}
}
}
}
if (serv.PscApiKey != "" && serv.Domains.Count > 0)
{