install script fixes
This commit is contained in:
@@ -73,17 +73,29 @@ echo "host all postgres,danbooru 127.0.0.1/32 trust"
|
|||||||
/etc/init.d/postgresql restart
|
/etc/init.d/postgresql restart
|
||||||
sudo -u postgres createuser -s danbooru
|
sudo -u postgres createuser -s danbooru
|
||||||
|
|
||||||
|
mkdir -p /var/log/www
|
||||||
|
|
||||||
# Setup nginx
|
# Setup nginx
|
||||||
curl -s https://raw.github.com/ascarter/nginx-ubuntu-rvm/master/nginx > /etc/init.d/nginx
|
curl -s https://raw.github.com/ascarter/nginx-ubuntu-rvm/master/nginx > /etc/init.d/nginx
|
||||||
chmod +x,g-w /etc/init.d/nginx
|
chmod +x,g-w /etc/init.d/nginx
|
||||||
update-rc.d -f nginx defaults
|
update-rc.d -f nginx defaults
|
||||||
mkdir -p /opt/nginx/sites
|
|
||||||
curl -s https://raw.github.com/r888888888/danbooru/master/script/install/nginx.conf > /opt/nginx/conf/nginx.conf
|
|
||||||
mkdir -p /opt/nginx/conf/sites
|
mkdir -p /opt/nginx/conf/sites
|
||||||
|
curl -s https://raw.github.com/r888888888/danbooru/master/script/install/nginx.conf > /opt/nginx/conf/nginx.conf
|
||||||
curl -s https://raw.github.com/r888888888/danbooru/master/script/install/nginx.danbooru.conf > /opt/nginx/conf/sites/danbooru.conf
|
curl -s https://raw.github.com/r888888888/danbooru/master/script/install/nginx.danbooru.conf > /opt/nginx/conf/sites/danbooru.conf
|
||||||
sed -i -e 's/HOSTNAME/$hostname/g' /opt/nginx/conf/sites/danbooru.conf
|
sed -i -e 's/HOSTNAME/$hostname/g' /opt/nginx/conf/sites/danbooru.conf
|
||||||
/etc/init.d/nginx start
|
/etc/init.d/nginx start
|
||||||
|
|
||||||
|
# Setup logrotate
|
||||||
|
LOGROTATE_CONF_FILE="/etc/logrotate.conf"
|
||||||
|
echo >> $LOGROTATE_CONF_FILE
|
||||||
|
echo "/var/log/www/danbooru.access.log" >> $LOGROTATE_CONF_FILE
|
||||||
|
echo "/var/log/www/danbooru.error.log">> $LOGROTATE_CONF_FILE
|
||||||
|
echo "/var/www/danbooru/current/log/production.log {" >> $LOGROTATE_CONF_FILE
|
||||||
|
echo " daily" >> $LOGROTATE_CONF_FILE
|
||||||
|
echo " rotate 3" >> $LOGROTATE_CONF_FILE
|
||||||
|
echo " copytruncate" >> $LOGROTATE_CONF_FILE
|
||||||
|
echo "}" >> $LOGROTATE_CONF_FILE
|
||||||
|
|
||||||
# Setup danbooru account
|
# Setup danbooru account
|
||||||
echo "*************************************************"
|
echo "*************************************************"
|
||||||
echo "* Enter a new password for the danbooru account *"
|
echo "* Enter a new password for the danbooru account *"
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ server {
|
|||||||
server_name HOSTNAME;
|
server_name HOSTNAME;
|
||||||
root /var/www/danbooru/public;
|
root /var/www/danbooru/public;
|
||||||
index index.html;
|
index index.html;
|
||||||
access_log /var/www/danbooru/log/server.access.log;
|
access_log /var/log/www/danbooru.access.log;
|
||||||
error_log /var/www/danbooru/log/server.error.log;
|
error_log /var/log/www/danbooru.error.log;
|
||||||
client_max_body_size 30m;
|
client_max_body_size 30m;
|
||||||
location /stylesheets {
|
location /stylesheets {
|
||||||
expires max;
|
expires max;
|
||||||
|
|||||||
Reference in New Issue
Block a user