]> CyberLeo.Net >> Repos - CDN/cdn-ports-overlay.git/blob - cdn/ports/misc-cdn/cdn-base/files/setup-cdn-base.in
misc-cdn/cdn-base: add bsdstats to default install
[CDN/cdn-ports-overlay.git] / cdn / ports / misc-cdn / cdn-base / files / setup-cdn-base.in
1 #!/bin/sh -e
2
3 [ "$(/usr/bin/id -u)" -eq 0 ] || ( echo "Run this script as root." >&2; exit 1 )
4
5 do_patch_sudoers() {
6   cat > %%PREFIX%%/etc/sudoers.d/00-wheel-gets-all <<"EOF"
7 # Allow members of group wheel to execute any command
8 %wheel ALL=(ALL) ALL
9 EOF
10 }
11
12 do_bash_config() {
13   %%PREFIX%%/share/bash-config/fixskel -i
14   %%PREFIX%%/share/bash-config/fixuser -i
15 }
16
17 do_start_tor() {
18   sysrc tor_enable=YES
19   service tor start
20 }
21
22 steps="patch_sudoers bash_config start_tor"
23
24 for step in ${steps}
25 do
26   echo "=> Performing step: ${step}"
27   do_${step}
28   echo "=> Done with step ${step}"
29   echo ""
30 done
31
32 echo "All done. You need not keep this port installed, unless"
33 echo "you wish to track changes made to the base set."