update startup

This commit is contained in:
Dryusdan 2018-01-17 20:16:22 +01:00
parent 8ff8ec071d
commit ebdced1eec
1 changed files with 13 additions and 2 deletions

View File

@ -1,4 +1,10 @@
#!/bin/sh
addgroup -g ${GID} web && adduser -H -s /bin/sh -D -G web -u ${UID} web
chown -R web:web /nginx /php /etc/s6.d /piwik /config /var/log /tmp /usr/share/GeoIP
chmod +x /etc/s6.d/*/run /etc/s6.d/.s6-svscan/finish
sed -i -e "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /nginx/conf/nginx.conf /php/etc/php-fpm.conf \
-e "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /php/etc/php-fpm.conf \
-e "s/<OPCACHE_MEM_SIZE>/$OPCACHE_MEM_SIZE/g" /php/conf.d/opcache.ini
@ -9,5 +15,10 @@ fi
ln -s /config/config.ini.php /piwik/config/config.ini.php
mv piwik fix && mv fix piwik # fix strange bug
chown -R $UID:$GID /piwik /config /var/log /php /nginx /tmp /usr/share/GeoIP /etc/s6.d
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d
if [ '$@' == '' ]; then
exec su-exec web:web /bin/s6-svscan /etc/s6.d
else
exec su-exec web:web "$@"
fi