blob: f17d7c263374b02ee74d59ca8f067674b79d6a26 (
plain) (
blame)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#!/bin/sh
set -e
REPO="$(dirname "$(realpath "$0")")"
. "$REPO/script/delete_dir.sh"
. "$REPO/script/delete_file.sh"
. "$REPO/script/install_dir.sh"
. "$REPO/script/install_file.sh"
usage() {
echo ' -?, -h, --help print help'
echo ' -d, --dry dry run'
echo '--delete-obsolete delete obsolete files and dirs'
}
DRY=''
while [[ "$1" == -* ]]; do
case "$1" in
-h|--help|-\?)
usage
exit
;;
-d|--dry)
DRY='YES'
;;
--delete-obsolete)
DELETE_OBSOLETE='YES'
;;
*)
echo "invalid option: $1" >&2
exit 1
;;
esac
shift
done
if [ "$DRY" != 'YES' ]; then
echo '==='
pkg_add \
bzip2 lzip unzip-- xz zstd \
curl git gnupg vim-- wget \
cgit gitolite \
mariadb-server \
php-8.3.32 php-curl-8.3.32 php-gd-8.3.32 php-intl-8.3.32 php-mysqli-8.3.32
fi
. "$REPO/files.sh"
if [ "$DRY" != 'YES' ]; then
echo '==='
echo 'Apply packet filter rules'
pfctl -f /etc/pf.conf && echo 'OK' || echo 'FAIL'
echo '==='
rcctl restart portmap
rcctl restart httpd mysqld nfsd php83_fpm slowcgi sshd
kill -KILL `cat /var/run/mountd.pid` || true
rcctl start mountd
echo '==='
mount -av
fi
echo '==='
|