upd
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s

This commit is contained in:
2026-06-08 12:19:07 +03:00
parent 3c5cf931ff
commit c2c0c8d1ad
6 changed files with 153 additions and 59 deletions
+2 -2
View File
@@ -21,13 +21,13 @@
})
using (var httpClient = new HttpClient(handler))
{
string requestUrl = $"{baseUrlS}/cgi-bin/configManager.cgi?action=setConfig&SNMP.Enable=false";
string requestUrl = $"{baseUrlS}/cgi-bin/configManager.cgi?action=setConfig&SNMP.Enable=false&SNMP.ReadCommon=public&SNMP.WriteCommon=private&SNMP.V2Enable=false";
var response = await httpClient.GetAsync(requestUrl);
response.EnsureSuccessStatusCode();
var r = response.ReasonPhrase;// .Content.ReadAsStringAsync();
if (r.StartsWith("OK"))
{
string requestUrl2 = $"{baseUrlS}/cgi-bin/configManager.cgi?action=setConfig&SNMP.Enable=true";
string requestUrl2 = $"{baseUrlS}/cgi-bin/configManager.cgi?action=setConfig&SNMP.Enable=true&SNMP.ReadCommon=public&SNMP.WriteCommon=private&SNMP.V2Enable=true";
var response2 = await httpClient.GetAsync(requestUrl2);
var r2 = response2.ReasonPhrase;//.Content.ReadAsStringAsync();
if (r2.StartsWith("OK")) Console.WriteLine("0");