forked from landlock-lsm/tuto-lighttpd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·34 lines (27 loc) · 934 Bytes
/
setup.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/bin/env bash
#
# Landlock tutorial to patch lighttpd
set -ueo pipefail nounset errexit
cd "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")"
set -x
pacman -Sy --noconfirm
pacman -S --noconfirm base-devel asp bash-completion vim tmux tree git openbsd-netcat strace cscope lighttpd fcgi php-cgi pacman-contrib liburing lua mariadb-libs
pushd /vagrant/
cp --no-preserve=mode -b vmlinuz-landlock-net /boot/vmlinuz-linux
cp --no-preserve=mode -b config/lighttpd.conf /etc/lighttpd/lighttpd.conf
cp --no-preserve=mode -b config/php.ini /etc/php/php.ini
cp --no-preserve=mode -b landlock.h /usr/include/linux/landlock.h
cp --no-preserve=mode web/*.php /srv/http/
cp --no-preserve=mode vimrc ~/.vimrc
popd
sudo -u vagrant -s <<--
pushd /home/vagrant/
asp update
asp checkout lighttpd
pushd lighttpd/trunk
gpg --import keys/pgp/*.asc
makepkg -si --noconfirm
popd
popd
-
systemctl enable --now lighttpd.service