mirror of https://gitlab.com/bashrc2/epicyon
Don't need webserver cache
parent
4cb70ca5d4
commit
2837966da2
14
deploy/i2p
14
deploy/i2p
|
@ -20,12 +20,6 @@ if [[ "$1" == 'remove' ]]; then
|
||||||
rm "/etc/nginx/sites-enabled/${username}"
|
rm "/etc/nginx/sites-enabled/${username}"
|
||||||
rm "/etc/nginx/sites-availale/${username}"
|
rm "/etc/nginx/sites-availale/${username}"
|
||||||
rm -rf ${install_destination}
|
rm -rf ${install_destination}
|
||||||
if [ -d /var/www/cache ]; then
|
|
||||||
rm -rf /var/www/cache
|
|
||||||
fi
|
|
||||||
if [ -d /srv/http/cache ]; then
|
|
||||||
rm -rf /srv/http/cache
|
|
||||||
fi
|
|
||||||
userdel -r ${username}
|
userdel -r ${username}
|
||||||
echo 'Epicyon i2p instance removed'
|
echo 'Epicyon i2p instance removed'
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -326,15 +320,9 @@ web_dir=/var/www
|
||||||
if [ -f /usr/bin/pacman ]; then
|
if [ -f /usr/bin/pacman ]; then
|
||||||
web_dir=/srv/http
|
web_dir=/srv/http
|
||||||
fi
|
fi
|
||||||
if [ ! -d ${web_dir}/cache ]; then
|
|
||||||
mkdir ${web_dir}/cache
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Creating nginx virtual host for http://${I2P_DOMAIN}"
|
echo "Creating nginx virtual host for http://${I2P_DOMAIN}"
|
||||||
{ echo "proxy_cache_path ${web_dir}/cache levels=1:2 keys_zone=my_cache:10m max_size=10g";
|
{ echo 'server {';
|
||||||
echo ' inactive=60m use_temp_path=off;'
|
|
||||||
echo '';
|
|
||||||
echo 'server {';
|
|
||||||
echo " listen 127.0.0.1:${NGINX_PORT} default_server;";
|
echo " listen 127.0.0.1:${NGINX_PORT} default_server;";
|
||||||
echo " server_name ${I2P_DOMAIN};"
|
echo " server_name ${I2P_DOMAIN};"
|
||||||
echo '';
|
echo '';
|
||||||
|
|
14
deploy/onion
14
deploy/onion
|
@ -15,12 +15,6 @@ if [[ "$1" == 'remove' ]]; then
|
||||||
rm "/etc/nginx/sites-enabled/${username}"
|
rm "/etc/nginx/sites-enabled/${username}"
|
||||||
rm "/etc/nginx/sites-availale/${username}"
|
rm "/etc/nginx/sites-availale/${username}"
|
||||||
rm -rf ${install_destination}
|
rm -rf ${install_destination}
|
||||||
if [ -d /var/www/cache ]; then
|
|
||||||
rm -rf /var/www/cache
|
|
||||||
fi
|
|
||||||
if [ -d /srv/http/cache ]; then
|
|
||||||
rm -rf /srv/http/cache
|
|
||||||
fi
|
|
||||||
userdel -r ${username}
|
userdel -r ${username}
|
||||||
echo 'Epicyon onion instance removed'
|
echo 'Epicyon onion instance removed'
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -245,18 +239,12 @@ web_dir=/var/www
|
||||||
if [ -f /usr/bin/pacman ]; then
|
if [ -f /usr/bin/pacman ]; then
|
||||||
web_dir=/srv/http
|
web_dir=/srv/http
|
||||||
fi
|
fi
|
||||||
if [ ! -d ${web_dir}/cache ]; then
|
|
||||||
mkdir ${web_dir}/cache
|
|
||||||
fi
|
|
||||||
if [ ! -d /var/www/${ONION_DOMAIN}/htdocs ]; then
|
if [ ! -d /var/www/${ONION_DOMAIN}/htdocs ]; then
|
||||||
mkdir -p /var/www/${ONION_DOMAIN}/htdocs
|
mkdir -p /var/www/${ONION_DOMAIN}/htdocs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Creating nginx virtual host for ${ONION_DOMAIN}"
|
echo "Creating nginx virtual host for ${ONION_DOMAIN}"
|
||||||
{ echo "proxy_cache_path ${web_dir}/cache levels=1:2 keys_zone=my_cache:10m max_size=10g";
|
{ echo 'server {';
|
||||||
echo ' inactive=60m use_temp_path=off;'
|
|
||||||
echo '';
|
|
||||||
echo 'server {';
|
|
||||||
echo " listen 127.0.0.1:${NGINX_PORT} default_server;";
|
echo " listen 127.0.0.1:${NGINX_PORT} default_server;";
|
||||||
echo " server_name ${ONION_DOMAIN};"
|
echo " server_name ${ONION_DOMAIN};"
|
||||||
echo '';
|
echo '';
|
||||||
|
|
Loading…
Reference in New Issue