forked from pf2ad/pf2ad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhy.sh
34 lines (34 loc) · 746 Bytes
/
why.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/usr/local/sbin/pfSsh.php <<EOF
\$samba = false;
foreach (\$config['installedpackages']['service'] as \$item) {
if ('samba' == \$item['name']) {
\$samba = true;
break;
}
}
if (\$samba == false) {
\$config['installedpackages']['service'][] = array(
'name' => 'samba',
'rcfile' => 'samba.sh',
'executable' => 'smbd',
'description' => 'Samba daemon'
);
}
\$samba = false;
foreach (\$config['installedpackages']['menu'] as \$item) {
if ('Samba (AD)' == \$item['name']) {
\$samba = true;
break;
}
}
if (\$samba == false) {
\$config['installedpackages']['menu'][] = array(
'name' => 'Samba (AD)',
'section' => 'Services',
'url' => '/pkg_edit.php?xml=samba.xml'
);
}
write_config();
exec;
exit
EOF