This commit is contained in:
CanbiZ
2025-09-15 15:38:03 +02:00
parent 3f69160fb9
commit eed916b6cc
51 changed files with 656 additions and 661 deletions

View File

@@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os

View File

@@ -8,69 +8,69 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
build-essential \
git \
libnewt-dev \
libssl-dev \
libncurses5-dev \
subversion \
libsqlite3-dev \
libjansson-dev \
libxml2-dev \
uuid-dev \
default-libmysqlclient-dev \
htop \
sngrep \
lame \
ffmpeg \
mpg123 \
vim \
expect \
openssh-server \
apache2 \
mariadb-server \
mariadb-client \
bison \
flex \
php8.2 \
php8.2-{curl,cli,common,mysql,gd,mbstring,intl,xml} \
php-pear \
sox \
sqlite3 \
pkg-config \
automake \
libtool \
autoconf \
unixodbc-dev \
uuid \
libasound2-dev \
libogg-dev \
libvorbis-dev \
libicu-dev \
libcurl4-openssl-dev \
odbc-mariadb \
libical-dev \
libneon27-dev \
libsrtp2-dev \
libspandsp-dev \
subversion \
libtool-bin \
python-dev-is-python3 \
unixodbc \
software-properties-common \
nodejs \
npm \
ipset \
iptables \
fail2ban \
php-soap
build-essential \
git \
libnewt-dev \
libssl-dev \
libncurses5-dev \
subversion \
libsqlite3-dev \
libjansson-dev \
libxml2-dev \
uuid-dev \
default-libmysqlclient-dev \
htop \
sngrep \
lame \
ffmpeg \
mpg123 \
vim \
expect \
openssh-server \
apache2 \
mariadb-server \
mariadb-client \
bison \
flex \
php8.2 \
php8.2-{curl,cli,common,mysql,gd,mbstring,intl,xml} \
php-pear \
sox \
sqlite3 \
pkg-config \
automake \
libtool \
autoconf \
unixodbc-dev \
uuid \
libasound2-dev \
libogg-dev \
libvorbis-dev \
libicu-dev \
libcurl4-openssl-dev \
odbc-mariadb \
libical-dev \
libneon27-dev \
libsrtp2-dev \
libspandsp-dev \
subversion \
libtool-bin \
python-dev-is-python3 \
unixodbc \
software-properties-common \
nodejs \
npm \
ipset \
iptables \
fail2ban \
php-soap
msg_ok "Installed Dependencies"
msg_info "Installing Asterisk (Patience)"

View File

@@ -5,46 +5,46 @@
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
msg_info "Installing Python3"
$STD apt-get install -y --no-install-recommends \
python3 \
python3-dev \
python3-setuptools \
python3-venv
python3 \
python3-dev \
python3-setuptools \
python3-venv
msg_ok "Installed Python3"
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y --no-install-recommends \
redis \
postgresql \
postgresql-contrib \
postgresql-client \
build-essential \
gnupg \
ffmpeg \
libjpeg-dev \
libpq-dev \
libmagic-dev \
libzbar0 \
poppler-utils \
automake \
libtool \
pkg-config \
curl \
libtiff-dev \
libpng-dev \
libleptonica-dev \
sudo \
make \
mc
redis \
postgresql \
postgresql-contrib \
postgresql-client \
build-essential \
gnupg \
ffmpeg \
libjpeg-dev \
libpq-dev \
libmagic-dev \
libzbar0 \
poppler-utils \
automake \
libtool \
pkg-config \
curl \
libtiff-dev \
libpng-dev \
libleptonica-dev \
sudo \
make \
mc
msg_ok "Installed Dependencies"
msg_info "Setup Funkwhale Dependencies (Patience)"
@@ -78,7 +78,7 @@ $STD sudo venv/bin/pip install --editable ./api
$STD sudo curl -L -o /opt/funkwhale/config/.env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/env.prod.sample"
secret_key=$(openssl rand -base64 45 | sed 's/\//\\\//g')
sudo sed -i "s/DJANGO_SECRET_KEY=.*/DJANGO_SECRET_KEY=$secret_key/" /opt/funkwhale/config/.env
sudo sed -i 's/# CACHE_URL=redis:\/\/127.0.0.1:6379\/0/CACHE_URL=redis:\/\/127.0.0.1:6379\/0/' /opt/funkwhale/config/.env #Remove #Hashtag From Config for Debian
sudo sed -i 's/# CACHE_URL=redis:\/\/127.0.0.1:6379\/0/CACHE_URL=redis:\/\/127.0.0.1:6379\/0/' /opt/funkwhale/config/.env #Remove #Hashtag From Config for Debian
sudo sed -i 's/# DATABASE_URL=postgresql:\/\/funkwhale@:5432\/funkwhale/DATABASE_URL=postgresql:\/\/funkwhale@:5432\/funkwhale/' /opt/funkwhale/config/.env #Remove #Hashtag From Config for Debian
# set the paths to /opt instead of /srv
sudo sed -i 's/MEDIA_ROOT=\/srv\/funkwhale\/data\/media/MEDIA_ROOT=\/opt\/funkwhale\/data\/media/' /opt/funkwhale/config/.env
@@ -99,7 +99,7 @@ DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;"
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;"
echo "" >>~/funkwhale.creds
echo -e "Funkwhale Database User: \e[32m$DB_USER\e[0m" >>~/funkwhale.creds
echo -e "Funkwhale Database Password: \e[32m$DB_PASS\e[0m" >>~/funkwhale.creds
@@ -130,26 +130,26 @@ msg_ok "Funkwhale successfully set up"
read -r -p "Would you like to Setup Reverse Proxy (Nginx)? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing NGINX"
$STD apt install -y nginx
sudo su
$STD curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale_proxy.conf"
$STD curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/nginx.template"
$STD set -a && source /opt/funkwhale/config/.env && set +a envsubst "`env | awk -F = '{printf \" $%s\", $$1}'`" \
< /etc/nginx/sites-available/funkwhale.template \
> /etc/nginx/sites-available/funkwhale.conf
$STD grep '${' /etc/nginx/sites-available/funkwhale.conf
$STD ln -s /etc/nginx/sites-available/funkwhale.conf /etc/nginx/sites-enabled/
$STD systemctl reload nginx
msg_ok "Installed Nginx"
msg_info "Installing NGINX"
$STD apt install -y nginx
sudo su
$STD curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale_proxy.conf"
$STD curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/nginx.template"
$STD set -a && source /opt/funkwhale/config/.env && set +a envsubst "$(env | awk -F = '{printf \" $%s\", $$1}')" \
</etc/nginx/sites-available/funkwhale.template \
>/etc/nginx/sites-available/funkwhale.conf
$STD grep '${' /etc/nginx/sites-available/funkwhale.conf
$STD ln -s /etc/nginx/sites-available/funkwhale.conf /etc/nginx/sites-enabled/
$STD systemctl reload nginx
msg_ok "Installed Nginx"
fi
read -r -p "Would you like to Setup TLS (Certbot)? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing Certbot"
$STD apt install -y certbot python3-certbot-nginx
$STD sudo certbot --nginx -d $FUNKWHALE_HOSTNAME
msg_ok "Installed Certbot"
msg_info "Installing Certbot"
$STD apt install -y certbot python3-certbot-nginx
$STD sudo certbot --nginx -d $FUNKWHALE_HOSTNAME
msg_ok "Installed Certbot"
fi
motd_ssh

View File

@@ -6,10 +6,10 @@
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
@@ -71,7 +71,7 @@ REDIS_PORT=6379
REDIS_PASSWORD="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
$STD redis-cli CONFIG SET requirepass "$REDIS_PASSWORD"
$STD redis-cli -a "$REDIS_PASSWORD" CONFIG REWRITE
$STD redis-cli -a "$REDIS_PASSWORD" CONFIG REWRITE
$STD systemctl restart redis
echo "" >>~/ghostfolio.creds
echo "Ghostfolio Redis Credentials" >>~/ghostfolio.creds
@@ -176,4 +176,4 @@ customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
msg_ok "Cleaned"

View File

@@ -9,25 +9,25 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \
pkg-config \
libssl-dev \
libc6-dev \
libpq-dev \
clang \
llvm \
nettle-dev \
build-essential \
curl \
sudo \
make \
mc
pkg-config \
libssl-dev \
libc6-dev \
libpq-dev \
clang \
llvm \
nettle-dev \
build-essential \
curl \
sudo \
make \
mc
msg_ok "Installed Dependencies"
msg_info "Installing Rust (Patience)"

View File

@@ -8,14 +8,14 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
iptables
iptables
msg_ok "Installed Dependencies"
msg_info "Installing JumpServer"

View File

@@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os

View File

@@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os

View File

@@ -5,10 +5,10 @@
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
@@ -22,8 +22,8 @@ msg_info "Installing netboot.xyz ${RELEASE}"
$STD curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/netbootxyz/netboot.xyz/archive/${RELEASE}.tar.gz"
$STD tar xvzf ${RELEASE}.tar.gz
VER=$(curl -s https://api.github.com/repos/netbootxyz/netboot.xyz/releases/latest |
grep "tag_name" |
awk '{print substr($2, 2, length($2)-3) }')
grep "tag_name" |
awk '{print substr($2, 2, length($2)-3) }')
rm -rf ${RELEASE}.tar.gz
mv netboot.xyz-${VER} /opt/netboot.xyz
msg_ok "Installed netboot.xyz ${RELEASE}"

View File

@@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
@@ -16,29 +16,29 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get update
$STD apt-get -y install \
sudo \
mc \
curl \
gnupg \
make \
gcc \
g++ \
ca-certificates \
apache2-utils \
logrotate \
build-essential \
git
sudo \
mc \
curl \
gnupg \
make \
gcc \
g++ \
ca-certificates \
apache2-utils \
logrotate \
build-essential \
git
msg_ok "Installed Dependencies"
msg_info "Installing Python3"
$STD apt-get install -y \
python3 \
python3-dev \
python3-pip \
python3-venv \
python3-cffi \
python3-certbot \
python3-certbot-dns-cloudflare
python3 \
python3-dev \
python3-pip \
python3-venv \
python3-cffi \
python3-certbot \
python3-certbot-dns-cloudflare
$STD pip3 install certbot-dns-multi
$STD python3 -m venv /opt/certbot/
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
@@ -76,7 +76,7 @@ sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.js
sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf
NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf")
for NGINX_CONF in $NGINX_CONFS; do
sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF"
sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF"
done
mkdir -p /var/www/html /etc/nginx/logs
@@ -88,21 +88,21 @@ ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf
rm -f /etc/nginx/conf.d/dev.conf
mkdir -p /tmp/nginx/body \
/run/nginx \
/data/nginx \
/data/custom_ssl \
/data/logs \
/data/access \
/data/nginx/default_host \
/data/nginx/default_www \
/data/nginx/proxy_host \
/data/nginx/redirection_host \
/data/nginx/stream \
/data/nginx/dead_host \
/data/nginx/temp \
/var/lib/nginx/cache/public \
/var/lib/nginx/cache/private \
/var/cache/nginx/proxy_temp
/run/nginx \
/data/nginx \
/data/custom_ssl \
/data/logs \
/data/access \
/data/nginx/default_host \
/data/nginx/default_www \
/data/nginx/proxy_host \
/data/nginx/redirection_host \
/data/nginx/stream \
/data/nginx/dead_host \
/data/nginx/temp \
/var/lib/nginx/cache/public \
/var/lib/nginx/cache/private \
/var/cache/nginx/proxy_temp
chmod -R 777 /var/cache/nginx
chown root /tmp/nginx
@@ -110,7 +110,7 @@ chown root /tmp/nginx
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf
if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null
fi
mkdir -p /app/global /app/frontend/images
@@ -130,7 +130,7 @@ msg_ok "Built Frontend"
msg_info "Initializing Backend"
rm -rf /app/config/default.json
if [ ! -f /app/config/production.json ]; then
cat <<'EOF' >/app/config/production.json
cat <<'EOF' >/app/config/production.json
{
"database": {
"engine": "knex-native",

View File

@@ -8,16 +8,16 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
msg_info "Installing dependencies"
$STD apt-get install -y \
build-essential \
openssl \
git
build-essential \
openssl \
git
msg_ok "Installed Dependencies"
msg_info "Installing Bun"
@@ -38,10 +38,10 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8'
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
{
echo "Nimbus-Credentials"
echo "Nimbus Database User: $DB_USER"
echo "Nimbus Database Password: $DB_PASS"
echo "Nimbus Database Name: $DB_NAME"
echo "Nimbus-Credentials"
echo "Nimbus Database User: $DB_USER"
echo "Nimbus Database Password: $DB_PASS"
echo "Nimbus Database Name: $DB_NAME"
} >>~/nimbus.creds
msg_ok "Set up PostgreSQL Database"

View File

@@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os

View File

@@ -9,7 +9,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os

View File

@@ -9,7 +9,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os

View File

@@ -8,20 +8,20 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
make \
git \
build-essential \
binutils \
pkg-config \
libsqlite3-dev \
libssl-dev
make \
git \
build-essential \
binutils \
pkg-config \
libsqlite3-dev \
libssl-dev
msg_ok "Installed Dependencies"
msg_info "Installing Rust"

View File

@@ -7,24 +7,24 @@
# https://github.com/tteck/Proxmox/raw/main/LICENSE
# Source: https://github.com/roundcube/roundcubemail
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
sudo \
mc \
postgresql \
apache2 \
libapache2-mod-php \
composer \
php8.2-{mbstring,gd,imap,mysql,ldap,curl,intl,imagick,bz2,sqlite3,zip,xml}
curl \
sudo \
mc \
postgresql \
apache2 \
libapache2-mod-php \
composer \
php8.2-{mbstring,gd,imap,mysql,ldap,curl,intl,imagick,bz2,sqlite3,zip,xml}
msg_ok "Installed Dependencies"
msg_info "Setting up PostgreSQL"
@@ -74,7 +74,7 @@ $STD sudo a2enmod deflate
$STD sudo a2enmod expires
$STD sudo a2enmod headers
$STD a2ensite roundcubemail.conf
$STD a2dissite 000-default.conf
$STD a2dissite 000-default.conf
$STD systemctl reload apache2
msg_ok "Installed Wallos"
@@ -85,4 +85,4 @@ msg_info "Cleaning up"
rm -rf /opt/roundcubemail-${RELEASE}-complete.tar.gz
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
msg_ok "Cleaned"

View File

@@ -4,11 +4,11 @@
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
@@ -16,7 +16,7 @@ update_os
# Generate a random string
generate_random_string() {
local LENGTH=$1
tr -dc A-Za-z0-9 </dev/urandom | head -c ${LENGTH} 2>/dev/null || true
tr -dc A-Za-z0-9 </dev/urandom | head -c ${LENGTH} 2>/dev/null || true
}
msg_info "Installing Dependencies"
@@ -46,7 +46,7 @@ msg_ok "Installed Redis"
msg_info "Installing Nginx"
$STD apk add nginx
rm -rf /etc/nginx/http.d/default.conf
cat <<'EOF'> /etc/nginx/http.d/default.conf
cat <<'EOF' >/etc/nginx/http.d/default.conf
server {
listen 80;
server_name localhost;
@@ -90,8 +90,8 @@ msg_ok "Installed Nginx"
msg_info "Installing MongoDB Database"
DB_NAME=ssm
DB_PORT=27017
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/main' >> /etc/apk/repositories
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/community' >> /etc/apk/repositories
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/main' >>/etc/apk/repositories
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/community' >>/etc/apk/repositories
$STD apk update
$STD apk add mongodb mongodb-tools
msg_ok "Installed MongoDB Database"
@@ -108,7 +108,7 @@ $STD git clone https://github.com/SquirrelCorporation/SquirrelServersManager.git
SECRET=$(generate_random_string 32)
SALT=$(generate_random_string 16)
VAULT_PWD=$(generate_random_string 32)
cat <<EOF > /opt/squirrelserversmanager/.env
cat <<EOF >/opt/squirrelserversmanager/.env
# SECRETS
SECRET=$SECRET
SALT=$SALT

View File

@@ -4,22 +4,22 @@
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
sudo \
mc \
gnupg \
apt-transport-https \
lsb-release
curl \
sudo \
mc \
gnupg \
apt-transport-https \
lsb-release
msg_ok "Installed Dependencies"
msg_info "Setting up PostgreSQL Repository"
@@ -60,10 +60,10 @@ cat <<EOF >/etc/postgresql/17/main/postgresql.conf
# FILE LOCATIONS
#------------------------------------------------------------------------------
data_directory = '/var/lib/postgresql/17/main'
hba_file = '/etc/postgresql/17/main/pg_hba.conf'
ident_file = '/etc/postgresql/17/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/17-main.pid'
data_directory = '/var/lib/postgresql/17/main'
hba_file = '/etc/postgresql/17/main/pg_hba.conf'
ident_file = '/etc/postgresql/17/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/17-main.pid'
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
@@ -71,10 +71,10 @@ external_pid_file = '/var/run/postgresql/17-main.pid'
# - Connection Settings -
listen_addresses = '*'
port = 5432
max_connections = 100
unix_socket_directories = '/var/run/postgresql'
listen_addresses = '*'
port = 5432
max_connections = 100
unix_socket_directories = '/var/run/postgresql'
# - SSL -
@@ -86,8 +86,8 @@ ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------
shared_buffers = 128MB
dynamic_shared_memory_type = posix
shared_buffers = 128MB
dynamic_shared_memory_type = posix
#------------------------------------------------------------------------------
# WRITE-AHEAD LOG
@@ -102,14 +102,14 @@ min_wal_size = 80MB
# - What to Log -
log_line_prefix = '%m [%p] %q%u@%d '
log_line_prefix = '%m [%p] %q%u@%d '
log_timezone = 'Etc/UTC'
#------------------------------------------------------------------------------
# PROCESS TITLE
#------------------------------------------------------------------------------
cluster_name = '17/main'
cluster_name = '17/main'
#------------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
@@ -119,23 +119,22 @@ cluster_name = '17/main'
datestyle = 'iso, mdy'
timezone = 'Etc/UTC'
lc_messages = 'C'
lc_monetary = 'C'
lc_numeric = 'C'
lc_time = 'C'
lc_messages = 'C'
lc_monetary = 'C'
lc_numeric = 'C'
lc_time = 'C'
default_text_search_config = 'pg_catalog.english'
#------------------------------------------------------------------------------
# CONFIG FILE INCLUDES
#------------------------------------------------------------------------------
include_dir = 'conf.d'
include_dir = 'conf.d'
EOF
systemctl restart postgresql
msg_ok "Installed PostgreSQL"
msg_info "Setup TimescaleDB"
echo "deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg
@@ -147,11 +146,11 @@ msg_ok "Setup TimescaleDB"
read -r -p "Would you like to add Adminer? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing Adminer"
$STD apt install -y adminer
$STD a2enconf adminer
systemctl reload apache2
msg_ok "Installed Adminer"
msg_info "Installing Adminer"
$STD apt install -y adminer
$STD a2enconf adminer
systemctl reload apache2
msg_ok "Installed Adminer"
fi
motd_ssh

View File

@@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
init_error_traps
setting_up_container
network_check
update_os