File tree Expand file tree Collapse file tree
mvc/app/models/OPNsense/DefguardGateway/ACL Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22function defguardgateway_services ()
33{
4+ global $ config ;
5+
46 $ services = [];
57
68 $ pidfile = (string ) (new OPNsense \DefguardGateway \DefguardGateway ())->general ->PidFile ;
79
8- $ services [] = [
9- "description " => "Defguard Gateway " ,
10- "configd " => [
11- "start " => ["defguard_gateway start " ],
12- "restart " => ["defguard_gateway restart " ],
13- "stop " => ["defguard_gateway stop " ],
14- ],
15- "pidfile " => empty ($ pidfile ) ? "/var/run/defguard_gateway.pid " : $ pidfile ,
16- "name " => "defguard_gateway " ,
17- ];
10+ if (isset ($ config ['OPNsense ' ]['defguardgateway ' ]['general ' ]['enabled ' ]) && $ config ['OPNsense ' ]['defguardgateway ' ]['general ' ]['enabled ' ] == 1 ) {
11+ $ services [] = [
12+ "description " => "Defguard Gateway " ,
13+ "configd " => [
14+ "start " => ["defguardgateway start " ],
15+ "restart " => ["defguardgateway restart " ],
16+ "stop " => ["defguardgateway stop " ],
17+ ],
18+ "pidfile " => empty ($ pidfile ) ? "/var/run/defguard_gateway.pid " : $ pidfile ,
19+ "name " => "defguardgateway " ,
20+ ];
21+ }
1822
1923 return $ services ;
2024}
Original file line number Diff line number Diff line change 1+ <acl >
2+ <page-services-defguardgateway >
3+ <name >Services: Defguard Gateway</name >
4+ <patterns >
5+ <pattern >ui/defguardgateway/*</pattern >
6+ <pattern >api/defguardgateway/*</pattern >
7+ </patterns >
8+ </page-services-defguardgateway >
9+ </acl >
File renamed without changes.
You can’t perform that action at this time.
0 commit comments