File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,15 @@ func (s *Systray) start() {
64
64
s .updateMenuItem (mRmCrashes , config .LogsIsEmpty ())
65
65
66
66
mGenCerts := systray .AddMenuItem ("Generate and Install HTTPS certificates" , "HTTPS Certs" )
67
+ mRemoveCerts := systray .AddMenuItem ("Remove HTTPS certificates" , "" )
67
68
// On linux/windows chrome/firefox/edge(chromium) the agent works without problems on plain HTTP,
68
69
// so we disable the menuItem to generate/install the certificates
69
70
if runtime .GOOS != "darwin" {
70
71
s .updateMenuItem (mGenCerts , true )
72
+ s .updateMenuItem (mRemoveCerts , true )
71
73
} else {
72
74
s .updateMenuItem (mGenCerts , config .CertsExist ())
75
+ s .updateMenuItem (mRemoveCerts , ! config .CertsExist ())
73
76
}
74
77
75
78
// Add pause/quit
@@ -103,6 +106,15 @@ func (s *Systray) start() {
103
106
cert .DeleteCertificates (certDir )
104
107
}
105
108
s .Restart ()
109
+ case <- mRemoveCerts .ClickedCh :
110
+ err := cert .UninstallCertificates ()
111
+ if err != nil {
112
+ log .Errorf ("cannot uninstall certificates something went wrong: %s" , err )
113
+ } else {
114
+ certDir := config .GetCertificatesDir ()
115
+ cert .DeleteCertificates (certDir )
116
+ }
117
+ s .Restart ()
106
118
case <- mPause .ClickedCh :
107
119
s .Pause ()
108
120
case <- mQuit .ClickedCh :
You can’t perform that action at this time.
0 commit comments