Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #91 from niiknow/master
Browse files Browse the repository at this point in the history
Fix startup
  • Loading branch information
noogen authored May 29, 2019
2 parents fb71d7a + 6342fb1 commit 5bb3216
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,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 \
Expand Down Expand Up @@ -151,7 +151,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {} ';'

8 changes: 7 additions & 1 deletion rootfs/sysprepz/admin/bin/my-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ 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
./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)
3 changes: 2 additions & 1 deletion rootfs/sysprepz/apache2-templates/php71fpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion rootfs/sysprepz/apache2-templates/php72fpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion rootfs/sysprepz/apache2-templates/php73fpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5bb3216

Please sign in to comment.