From 12190efb4c452a6d293f4ed8c0069b09075535f5 Mon Sep 17 00:00:00 2001 From: noogen Date: Tue, 21 May 2019 09:51:11 -0500 Subject: [PATCH 1/4] fix new temp folder --- rootfs/sysprepz/admin/bin/my-startup.sh | 5 +++++ rootfs/sysprepz/apache2-templates/php71fpm.sh | 3 ++- rootfs/sysprepz/apache2-templates/php72fpm.sh | 3 ++- rootfs/sysprepz/apache2-templates/php73fpm.sh | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/rootfs/sysprepz/admin/bin/my-startup.sh b/rootfs/sysprepz/admin/bin/my-startup.sh index 4ce4f55..41e4305 100755 --- a/rootfs/sysprepz/admin/bin/my-startup.sh +++ b/rootfs/sysprepz/admin/bin/my-startup.sh @@ -8,6 +8,11 @@ cd /etc/init.d/ ./apache2 start ./mysql start +# delete old php-fpm running file on restart +rm -f /var/run/vesta*.sock +rm -f /var/run/vesta*.pid +rm -f /var/run/nginx.pid + # delete defult postgres admindb if not use, then comment out the line below ./postgresql start ./nginx start diff --git a/rootfs/sysprepz/apache2-templates/php71fpm.sh b/rootfs/sysprepz/apache2-templates/php71fpm.sh index 8a0df8b..84bdd71 100755 --- a/rootfs/sysprepz/apache2-templates/php71fpm.sh +++ b/rootfs/sysprepz/apache2-templates/php71fpm.sh @@ -60,7 +60,8 @@ echo "$fpm_conf" > $fpm_conf_file chown $user:$user $fpm_conf_file chmod -f 751 $fpm_conf_file mkdir -p /home/$user/web/$domain/tmp/cache -rm -rf /home/$user/web/$domain/tmp/cache +rm -rf /home/$user/web/$domain/tmp/* +chown $user:$user /home/$user/web/$domain/tmp mkdir -p /home/$user/web/$domain/tmp/cache chown -R www-data:www-data /home/$user/web/$domain/tmp/cache diff --git a/rootfs/sysprepz/apache2-templates/php72fpm.sh b/rootfs/sysprepz/apache2-templates/php72fpm.sh index 6939ea8..1672f6f 100755 --- a/rootfs/sysprepz/apache2-templates/php72fpm.sh +++ b/rootfs/sysprepz/apache2-templates/php72fpm.sh @@ -60,7 +60,8 @@ echo "$fpm_conf" > $fpm_conf_file chown $user:$user $fpm_conf_file chmod -f 751 $fpm_conf_file mkdir -p /home/$user/web/$domain/tmp/cache -rm -rf /home/$user/web/$domain/tmp/cache +rm -rf /home/$user/web/$domain/tmp/* +chown $user:$user /home/$user/web/$domain/tmp mkdir -p /home/$user/web/$domain/tmp/cache chown -R www-data:www-data /home/$user/web/$domain/tmp/cache diff --git a/rootfs/sysprepz/apache2-templates/php73fpm.sh b/rootfs/sysprepz/apache2-templates/php73fpm.sh index 5db8552..9934e56 100755 --- a/rootfs/sysprepz/apache2-templates/php73fpm.sh +++ b/rootfs/sysprepz/apache2-templates/php73fpm.sh @@ -60,7 +60,8 @@ echo "$fpm_conf" > $fpm_conf_file chown $user:$user $fpm_conf_file chmod -f 751 $fpm_conf_file mkdir -p /home/$user/web/$domain/tmp/cache -rm -rf /home/$user/web/$domain/tmp/cache +rm -rf /home/$user/web/$domain/tmp/* +chown $user:$user /home/$user/web/$domain/tmp mkdir -p /home/$user/web/$domain/tmp/cache chown -R www-data:www-data /home/$user/web/$domain/tmp/cache From d4190f63f05ef4113d6b87220438fa736db90136 Mon Sep 17 00:00:00 2001 From: noogen Date: Tue, 21 May 2019 17:11:20 -0500 Subject: [PATCH 2/4] update installer script --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1617cc6..3b12952 100644 --- a/Dockerfile +++ b/Dockerfile @@ -89,8 +89,8 @@ RUN cd /tmp \ RUN cd /tmp \ && touch /var/log/auth.log \ # begin setup for vesta - && curl -SL https://raw.githubusercontent.com/serghey-rodin/vesta/59695acd10ce63740bcf274a13569230362e06c5/install/vst-install-ubuntu.sh -o /tmp/vst-install-ubuntu.sh \ - && sed -i -e "s/mysql\-server nginx/mysql-server/g" /tmp/vst-install-ubuntu.sh \ + && curl -SL https://raw.githubusercontent.com/serghey-rodin/vesta/3acd2281699fcaede439da0687d64586525a15a1/install/vst-install-ubuntu.sh -o /tmp/vst-install-ubuntu.sh \ + && sed -i -e "s/software\=\"nginx /software\=\"/g" /tmp/vst-install-ubuntu.sh \ # fix mariadb instead of mysql && sed -i -e "s/mysql\-/mariadb\-/g" /tmp/vst-install-ubuntu.sh \ From 7f3cb87c31fcca8986b11d9a372a77dcc1a27fe3 Mon Sep 17 00:00:00 2001 From: noogen Date: Thu, 23 May 2019 22:41:15 -0500 Subject: [PATCH 3/4] add dbadmin.conf --- rootfs/etc/my_init.d/startup.sh | 2 ++ rootfs/sysprepz/admin/bin/my-startup.sh | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rootfs/etc/my_init.d/startup.sh b/rootfs/etc/my_init.d/startup.sh index 1354a3e..20e6464 100755 --- a/rootfs/etc/my_init.d/startup.sh +++ b/rootfs/etc/my_init.d/startup.sh @@ -60,3 +60,5 @@ if [ -f /bin/vesta-auto-ssl.sh ]; then bash /bin/vesta-auto-ssl.sh fi +find /home/admin/web -maxdepth 2 -type d -name "private" -exec sh -c 'echo "include /etc/nginx/conf.d/dbadmin.inc;" > $1/dbadmin.conf ' sh {} ';' + diff --git a/rootfs/sysprepz/admin/bin/my-startup.sh b/rootfs/sysprepz/admin/bin/my-startup.sh index 41e4305..276b175 100755 --- a/rootfs/sysprepz/admin/bin/my-startup.sh +++ b/rootfs/sysprepz/admin/bin/my-startup.sh @@ -15,10 +15,11 @@ rm -f /var/run/nginx.pid # delete defult postgres admindb if not use, then comment out the line below ./postgresql start -./nginx start ./vesta start + ./php7.2-fpm start ./php7.3-fpm start +./nginx start # ./fail2ban start \ # -- only if you run with: --cap-add=NET_ADMIN --cap-add=NET_RAW # other services (exim4, dovecot, clamav-daemon, spamassassin, couchdb, mongodb) From 6342fb1e91093d388e3c6330b8bfb56f5692a915 Mon Sep 17 00:00:00 2001 From: noogen Date: Wed, 29 May 2019 00:01:00 -0500 Subject: [PATCH 4/4] fix startup issue --- Dockerfile | 2 +- rootfs/etc/my_init.d/{startup.sh => !0_startup.sh} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename rootfs/etc/my_init.d/{startup.sh => !0_startup.sh} (100%) diff --git a/Dockerfile b/Dockerfile index 3b12952..b83aa4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -150,7 +150,7 @@ RUN cd /tmp \ && chmod +x /etc/init.d/dovecot \ && chmod +x /etc/service/sshd/run \ && chmod +x /etc/init.d/mongod \ - && chmod +x /etc/my_init.d/startup.sh \ + && chmod +x /etc/my_init.d/!0_startup.sh \ && mv /sysprepz/admin/bin/vesta-*.sh /bin \ # install iconcube loader extension diff --git a/rootfs/etc/my_init.d/startup.sh b/rootfs/etc/my_init.d/!0_startup.sh similarity index 100% rename from rootfs/etc/my_init.d/startup.sh rename to rootfs/etc/my_init.d/!0_startup.sh