Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow adding all files, rather than just binary executables #59

Merged
merged 2 commits into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions update-chroot/update-chroot.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
### Copyright 1999-2022. Plesk International GmbH.
### Copyright 1999-2024. WebPros International GmbH.

###############################################################################
# This script manages and updates chroot environment used in Plesk
Expand Down Expand Up @@ -313,16 +313,12 @@ install_chroot_program() {
case "$filetype" in
application/octet-stream*|\
application/x-executable*|\
application/x-shellscript*|\
text/x-shellscript*|\
application/x-sharedlib*|\
application/x-pie-executable*|\
text/x-perl*)
application/x-pie-executable*)
install_libs "$path"
;;
*)
warn "$path is not a program (filetype $filetype), skipping."
return 2
warn "$path is not an binary executable (filetype $filetype). Shared libraries will not be copied."
;;
esac

Expand Down Expand Up @@ -451,7 +447,7 @@ install_ld() {
"$CHROOT_ROOT_D/lib/x86_64-linux-gnu"
$COPY /lib64/ld-linux* "$CHROOT_ROOT_D/lib64/"
else
libcheck="$(ls /lib/ld-linux* 2> /dev/null | wc -l)"
libcheck="$(find /lib/ -maxdepth 1 -name 'ld-linux*' 2>/dev/null | wc -l)"
if [[ $libcheck -ne 0 ]]; then
$COPY /lib/ld-linux* /lib/libnss_*.so.2 "$CHROOT_ROOT_D/lib"
fi
Expand Down Expand Up @@ -606,7 +602,6 @@ full_rebuild() {
apply_template "--apply" "$domain"
done
echo -e "\\e[32mDone!\\e[m Successfully rebuilt and reappplied template."
exit 0
}

###########################################################
Expand Down