parent
9b4963b10e
commit
1bb12283be
@ -1,2 +1,2 @@
|
||||
# Calculate append=after path=/etc name=#-cut(2,.)-# grep(/etc/#-cut(2,.)-#,#-cut(1,.)-#)== protected
|
||||
homeassistant:!:19443::::::
|
||||
homeassistant:!:19446::::::
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Calculate format=samba path=/var/calculate chmod=600 chown=homeassistant:homeassistant comment=# grep(/var/calculate/ini.env,homeassistant)== protected
|
||||
# Calculate format=samba path=/var/calculate chmod=600 chown=homeassistant:homeassistant grep(/var/calculate/ini.env,homeassistant_sites_domain)== protected
|
||||
[homeassistant]
|
||||
protocol = http
|
||||
domain = home.example.org
|
||||
|
@ -1 +1 @@
|
||||
# Calculate path=/var/log name=homeassistant chown=homeassistant:homeassistant
|
||||
# Calculate path=/var/log name=homeassistant chmod=750 chown=homeassistant:homeassistant
|
||||
|
@ -1 +1 @@
|
||||
# Calculate path=/etc/runlevels/default name=#-cut(1,.)-# link=/etc/init.d/#-cut(1,.)-# protected symbolic exists(/var/calculate/www/homeassistant/.venv)!=
|
||||
# Calculate path=/etc/runlevels/default name=#-cut(1,.)-# link=/etc/init.d/#-cut(1,.)-# protected symbolic exists(/var/calculate/www/homeassistant/.homeassistant)!=
|
||||
|
@ -1 +1 @@
|
||||
# Calculate chmod=750 chown=homeassistant:nginx
|
||||
# Calculate chmod=750 chown=homeassistant:homeassistant
|
||||
|
@ -1,50 +1,9 @@
|
||||
# Calculate path=/etc/nginx/sites-enabled exists(/etc/nginx/sites-enabled/#-cut()-#)== comment=#
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
# These shouldn't need to be changed
|
||||
listen 80 default_server;
|
||||
#return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
# Update this line to be your domain
|
||||
#server_name home.example.org;
|
||||
|
||||
access_log /var/log/nginx/homeassistant.access_log main;
|
||||
error_log /var/log/nginx/homeassistant.error_log info;
|
||||
|
||||
# Ensure these lines point to your SSL certificate and key
|
||||
ssl_certificate /etc/nginx/ssl/homeassistant/fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/homeassistant/privkey.pem;
|
||||
|
||||
# Ensure this line points to your dhparams file
|
||||
# ssl_dhparam /etc/nginx/ssl/dhparams.pem;
|
||||
|
||||
|
||||
# These shouldn't need to be changed
|
||||
# listen [::]:443 ssl default_server ipv6only=off; # if your nginx version is >= 1.9.5 you can also add the "http2" flag here
|
||||
listen 443 ssl default_server; # if your nginx version is >= 1.9.5 you can also add the "http2" flag here
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
|
||||
|
||||
ssl_protocols TLSv1.2;
|
||||
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
|
||||
proxy_buffering off;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8123;
|
||||
proxy_set_header Host localhost;
|
||||
#proxy_set_header Host $host;
|
||||
proxy_redirect http:// https://;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_pass "http://127.0.0.1:8123";
|
||||
}
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
# Calculate path=/etc/nginx/ssl name=#-cut(1,.)-# link=/var/calculate/ssl symbolic protected
|
@ -1 +0,0 @@
|
||||
# Calculate path=/var/calculate
|
@ -1 +0,0 @@
|
||||
# Calculate env=install ac_install_merge==on mergepkg(dev-db/postgresql)!= append=skip
|
@ -1,5 +0,0 @@
|
||||
# Calculate run=/bin/bash
|
||||
|
||||
ver=$(ls -d /var/db/pkg/dev-db/postgresql-*)
|
||||
ver=${ver#*postgresql-}
|
||||
echo ${ver%%.*} > /tmp/pgsqlver
|
@ -1 +0,0 @@
|
||||
# Calculate path=/var/calculate name=postgresql chmod=700 chown=postgres:postgres
|
@ -1 +0,0 @@
|
||||
# Calculate path=/etc name=postgresql-#-load(char,/tmp/pgsqlver)-#
|
@ -1,10 +0,0 @@
|
||||
# Calculate chmod=600 comment=# chown=postgres:postgres
|
||||
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
|
||||
# "local" is for Unix domain socket connections only
|
||||
local all all password
|
||||
# IPv4 local connections:
|
||||
host all all 127.0.0.1/32 password
|
||||
# IPv6 local connections:
|
||||
host all all ::1/128 password
|
@ -1 +0,0 @@
|
||||
# Calculate chmod=600 comment=# chown=postgres:postgres
|
@ -1,22 +0,0 @@
|
||||
# Calculate chmod=600 comment=# chown=postgres:postgres
|
||||
|
||||
max_connections = 100 # (change requires restart)
|
||||
shared_buffers = 128MB # min 128kB
|
||||
dynamic_shared_memory_type = posix # the default is the first option
|
||||
max_wal_size = 1GB
|
||||
min_wal_size = 80MB
|
||||
log_timezone = 'W-SU'
|
||||
datestyle = 'iso, dmy'
|
||||
timezone = 'W-SU'
|
||||
lc_messages = '#-os_install_locale_lang-#.UTF-8'
|
||||
lc_monetary = '#-os_install_locale_lang-#.UTF-8'
|
||||
lc_numeric = 'C'
|
||||
lc_time = '#-os_install_locale_lang-#.UTF-8'
|
||||
#?os_locale_language==ru#
|
||||
default_text_search_config = 'pg_catalog.russian'
|
||||
#!os_locale_language#
|
||||
default_text_search_config = 'pg_catalog.english'
|
||||
#os_locale_language#
|
||||
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
|
||||
|
||||
listen_addresses = '127.0.0.1'
|
@ -1,4 +0,0 @@
|
||||
# Calculate format=samba path=/var/calculate grep(/var/calculate/ini.env,postgresql)== comment=# protected
|
||||
[postgresql]
|
||||
postgres_password = #-rnd(pas,12)-#
|
||||
homeassistant_password = #-rnd(pas,12)-#
|
@ -1 +0,0 @@
|
||||
# Calculate path=/var/lib name=postgresql link=/var/calculate/postgresql symbolic protected
|
@ -1,3 +0,0 @@
|
||||
# Calculate path=/root name=.pgpass chmod=600 comment=# protected
|
||||
localhost:*:*:postgres:#-ini(postgresql.postgres_password)-#
|
||||
localhost:*:*:homeassistant:#-ini(postgresql.homeassistant_password)-#
|
@ -1,7 +1,2 @@
|
||||
# Calculate env=update ac_update_sync==on path=/var/lib/portage cl_update_world==merge||cl_update_world==rebuild format=world
|
||||
app-admin/syslog-ng
|
||||
app-text/tree
|
||||
dev-db/postgresql
|
||||
#media-video/ffmpeg
|
||||
sys-process/cronie
|
||||
www-servers/nginx
|
||||
|
@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ueo pipefail
|
||||
|
||||
[[ -n "$(ls -A /var/lib/postgresql)" ]] && exit
|
||||
|
||||
export PATH="/lib/rc/bin:$PATH"
|
||||
|
||||
. /var/db/repos/container/scripts/functions.sh
|
||||
. /var/db/repos/calculate/scripts/ini.sh
|
||||
|
||||
pgver() {
|
||||
local ver=$(ls -d /var/db/pkg/dev-db/postgresql-*)
|
||||
ver=${ver#*postgresql-}
|
||||
if [[ ${1:-} == 'slot' ]]; then
|
||||
echo ${ver%%.*}
|
||||
else
|
||||
echo ${ver%%-*}
|
||||
fi
|
||||
}
|
||||
|
||||
emerge --config =dev-db/postgresql-$(pgver)
|
||||
|
||||
/etc/init.d/postgresql-$(pgver slot) start
|
||||
|
||||
psql -U postgres -c "ALTER USER postgres WITH PASSWORD '${ini[postgresql.postgres_password]}'"
|
||||
psql -U postgres -c "CREATE ROLE ${ini[postgresql.homeassistant_user]} WITH login"
|
||||
psql -U postgres -c "CREATE DATABASE homeassistant OWNER homeassistant"
|
||||
psql -U postgres -c "ALTER USER ${ini[postgresql.homeassistant_user]} WITH PASSWORD '${ini[postgresql.homeassistant_password]}'"
|
||||
|
||||
cl-core-setup -n postgresql -f
|
||||
|
||||
/etc/init.d/postgresql-$(pgver slot) restart
|
Loading…
Reference in new issue