From 796fe3cb1f0b63530d443720a1ee122e7ef6f11d Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Thu, 22 Apr 2021 13:17:36 -0700 Subject: [PATCH] /usr/local/libexec --- bin/vhost-user-add.sh | 2 +- install.sh | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/vhost-user-add.sh b/bin/vhost-user-add.sh index 699b7f9..d154bc7 100644 --- a/bin/vhost-user-add.sh +++ b/bin/vhost-user-add.sh @@ -56,7 +56,7 @@ if [[ ! -f "/home/$username/.bashrc" ]]; then echo 'export TERM=xterm-256color' >> /home/$username/.bashrc echo '' >> /home/$username/.bashrc echo 'command_not_found_handle () {' >> /home/$username/.bashrc - echo ' /usr/libexec/command-not-found-handle $@' >> /home/$username/.bashrc + echo ' /usr/local/libexec/command-not-found-handle $@' >> /home/$username/.bashrc echo ' return 127' >> /home/$username/.bashrc echo '}' >> /home/$username/.bashrc fi diff --git a/install.sh b/install.sh index b665da8..5425271 100755 --- a/install.sh +++ b/install.sh @@ -120,16 +120,19 @@ sed -i 's|paths = ssh|paths = /usr/bin/ssh*|' /etc/jailkit/jk_init.ini echo "" >> /etc/jailkit/jk_init.ini echo "[shellstack]" >> /etc/jailkit/jk_init.ini echo "comment = full featured shell for vhost-stack jails" >> /etc/jailkit/jk_init.ini -echo "paths = curl, dircolors, du, env, git, groups, mysql, mysqldump, /etc/bash_completion, /etc/bash_completion.d/, /usr/share/bash-completion/, /etc/ssl/certs/, /etc/nanorc, /usr/libexec/command-not-found-handle, /usr/share/nano/, /usr/share/zoneinfo/, /usr/local/bin/composer, /usr/local/bin/wp, /usr/local/sbin/mini_sendmail" >> /etc/jailkit/jk_init.ini +echo "paths = curl, dircolors, du, env, git, groups, mysql, mysqldump, /etc/bash_completion, /etc/bash_completion.d/, /usr/share/bash-completion/, /etc/ssl/certs/, /etc/nanorc, /usr/local/libexec/command-not-found-handle, /usr/share/nano/, /usr/share/zoneinfo/, /usr/local/bin/composer, /usr/local/bin/wp, /usr/local/sbin/mini_sendmail" >> /etc/jailkit/jk_init.ini echo "includesections = extendedshell, netutils, logbasics, apacheutils, php" >> /etc/jailkit/jk_init.ini echo "" >> /etc/jailkit/jk_init.ini echo "[php]" >> /etc/jailkit/jk_init.ini echo "comment = php-cli and all required files" >> /etc/jailkit/jk_init.ini echo "paths = /usr/bin/php*, /usr/bin/phar*, /etc/php/*/cli/, /etc/php/*/mods-available/, /usr/lib/php/, /usr/share/php/" >> /etc/jailkit/jk_init.ini mkdir /usr/jails -cp libexec/command-not-found-handle /usr/libexec/command-not-found-handle -chmod 755 /usr/libexec/command-not-found-handle -chown root:root /usr/libexec/command-not-found-handle +if ! [ -d "/usr/local/libexec" ]; then + mkdir /usr/local/libexec +fi +cp libexec/command-not-found-handle /usr/local/libexec/command-not-found-handle +chmod 755 /usr/local/libexec/command-not-found-handle +chown root:root /usr/local/libexec/command-not-found-handle # varnish apt -y install varnish @@ -160,7 +163,10 @@ apt -y install php-bz2 php-tcpdf cd /usr/local/src wget https://files.phpmyadmin.net/phpMyAdmin/5.1.0/phpMyAdmin-5.1.0-all-languages.tar.gz tar zxf phpMyAdmin-5.1.0-all-languages.tar.gz -rm -r phpMyAdmin-5.1.0-all-languages/setup/ phpMyAdmin-5.1.0-all-languages/test/ +rm -r phpMyAdmin-5.1.0-all-languages/setup/ +if [ -d "phpMyAdmin-5.1.0-all-languages/test/" ]; then + rm -r phpMyAdmin-5.1.0-all-languages/test/ +fi blowfish_secret=`pwgen 32 -1` echo ' phpMyAdmin-5.1.0-all-languages/config.inc.php echo "declare(strict_types=1);" >> phpMyAdmin-5.1.0-all-languages/config.inc.php