28 lines
778 B
Bash
28 lines
778 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
TFTP=/srv/tftp
|
||
|
|
||
|
# create directories
|
||
|
mkdir -p ${TFTP}
|
||
|
mkdir -p ${TFTP}/pxelinux.cfg
|
||
|
|
||
|
# copy Files from the Resource-Dir to the correct places:
|
||
|
cp ./resources/lighttpd.conf /etc/lighttpd/lighttpd.conf
|
||
|
cp ./resources/exports /etc/exports
|
||
|
cp ./resources/default-minimal ${TFTP}/pxelinux.cfg/default
|
||
|
cp ./resources/splash.png ${TFTP}/
|
||
|
cp -a /usr/lib/syslinux/modules/bios ${TFTP}/
|
||
|
|
||
|
# Link needed Files from installed Debian Packages to the TFTP-Root:
|
||
|
ln /usr/lib/PXELINUX/pxelinux.0 $TFTP/
|
||
|
ln /boot/ipxe.lkrn $TFTP/
|
||
|
ln ${TFTP}/bios/ldlinux.c32 $TFTP/
|
||
|
ln ${TFTP}/pxelinux.cfg/default ${TFTP}/default -s
|
||
|
|
||
|
# set file access
|
||
|
chown www-data.www-data ${TFTP} -R
|
||
|
chmod a+rwx ${TFTP} -R
|
||
|
|
||
|
# restart services
|
||
|
systemctl restart tftpd-hpa lighttpd nfs-kernel-server
|