Complete first alpha version

This commit is contained in:
Daniel
2018-12-12 19:18:23 +01:00
parent 8c11a35590
commit f35872ec51
36 changed files with 624 additions and 293 deletions

25
status/module.go Normal file
View File

@@ -0,0 +1,25 @@
package status
import (
"github.com/Safing/portbase/log"
"github.com/Safing/portbase/modules"
)
func init() {
modules.Register("status", prep, nil, nil)
}
func prep() error {
if CurrentSecurityLevel() == SecurityLevelOff {
log.Infof("switching to default active security level: dynamic")
SetCurrentSecurityLevel(SecurityLevelDynamic)
}
if SelectedSecurityLevel() == SecurityLevelOff {
log.Infof("switching to default selected security level: dynamic")
SetSelectedSecurityLevel(SecurityLevelDynamic)
}
return nil
}