Use sudo instead of a custom script

This commit is contained in:
Xavier Henner
2019-07-11 14:40:46 +02:00
parent f73b2c117a
commit 3c0434ee1f
5 changed files with 9 additions and 56 deletions

View File

@@ -33,7 +33,6 @@ type OpenVpnMgt struct {
newAsTemplate string
cacheDir string
syslog bool
ipRouteScript string
otpMasterSecrets []string
hibpClient *hibp.Client
debug bool
@@ -130,7 +129,7 @@ func (s *OpenVpnMgt) Kill(session string, id int) error {
if _, ok := s.clients[session][id]; !ok {
return errors.New("unknown session id")
}
err, msg := s.sendCommand([]string{fmt.Sprintf("client-kill %d", id)}, session)
err, _ := s.sendCommand([]string{fmt.Sprintf("client-kill %d", id)}, session)
return err
}