#!/bin/sh # Written by nixCraft # Warning: This is old and outdated script. Use l2chroot.txt file # http://www.cyberciti.biz/files/lighttpd/l2chroot.txt # --------------------------------------------------- BASE="/webroot" FILES="$(ldd $1 | awk '{ print $3 }')" echo $FILES for i in $FILES do d="$(dirname $i)" [ ! -d $BASE$d ] && mkdir -p $BASE$d || : cp $i $BASE$d done