test
This commit is contained in:
parent
3f69160fb9
commit
eed916b6cc
@ -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
|
||||
@ -46,7 +46,7 @@ msg_ok "Setup Garage packages"
|
||||
|
||||
msg_info "Writing config"
|
||||
if [[ ! -f /etc/garage.toml ]]; then
|
||||
cat >/etc/garage.toml <<EOF
|
||||
cat >/etc/garage.toml <<EOF
|
||||
replication_factor = 1
|
||||
consistency_mode = "consistent"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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)"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}"
|
||||
|
@ -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",
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -20,15 +20,15 @@ update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
build-essential \
|
||||
gcc \
|
||||
libpcre3-dev \
|
||||
libpq-dev \
|
||||
nginx \
|
||||
redis-server \
|
||||
ffmpeg \
|
||||
procps \
|
||||
streamlink
|
||||
build-essential \
|
||||
gcc \
|
||||
libpcre3-dev \
|
||||
libpq-dev \
|
||||
nginx \
|
||||
redis-server \
|
||||
ffmpeg \
|
||||
procps \
|
||||
streamlink
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
@ -47,10 +47,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 "Dispatcharr-Credentials"
|
||||
echo "Dispatcharr Database Name: $DB_NAME"
|
||||
echo "Dispatcharr Database User: $DB_USER"
|
||||
echo "Dispatcharr Database Password: $DB_PASS"
|
||||
echo "Dispatcharr-Credentials"
|
||||
echo "Dispatcharr Database Name: $DB_NAME"
|
||||
echo "Dispatcharr Database User: $DB_USER"
|
||||
echo "Dispatcharr Database Password: $DB_PASS"
|
||||
} >>~/dispatcharr.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
@ -63,10 +63,10 @@ mapfile -t EXTRA_INDEX_URLS < <(grep -E '^(--(extra-)?index-url|-i)\s' requireme
|
||||
|
||||
UV_INDEX_ARGS=(--index-url "$PYPI_URL" --index-strategy unsafe-best-match)
|
||||
for u in "${EXTRA_INDEX_URLS[@]}"; do
|
||||
[[ -n "$u" && "$u" != "$PYPI_URL" ]] && UV_INDEX_ARGS+=(--extra-index-url "$u")
|
||||
[[ -n "$u" && "$u" != "$PYPI_URL" ]] && UV_INDEX_ARGS+=(--extra-index-url "$u")
|
||||
done
|
||||
if [[ -f requirements.txt ]]; then
|
||||
$STD uv pip install --system "${UV_INDEX_ARGS[@]}" -r requirements.txt
|
||||
$STD uv pip install --system "${UV_INDEX_ARGS[@]}" -r requirements.txt
|
||||
fi
|
||||
$STD uv pip install --system "${UV_INDEX_ARGS[@]}" gunicorn gevent celery daphne
|
||||
ln -sf /usr/bin/ffmpeg /opt/dispatcharr/env/bin/ffmpeg
|
||||
|
@ -7,7 +7,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
init_error_traps
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
@ -23,15 +23,14 @@ $STD apt-get install -y \
|
||||
ca-certificates \
|
||||
apt-transport-https \
|
||||
tesseract-ocr
|
||||
#tesseract-ocr-deu \
|
||||
#tesseract-ocr-eng \
|
||||
#unpaper \
|
||||
#unoconv \
|
||||
#wkhtmltopdf \
|
||||
#ocrmypdf
|
||||
#tesseract-ocr-deu \
|
||||
#tesseract-ocr-eng \
|
||||
#unpaper \
|
||||
#unoconv \
|
||||
#wkhtmltopdf \
|
||||
#ocrmypdf
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
||||
setup_gs
|
||||
JAVA_VERSION="21" setup_java
|
||||
POSTGRES_VERSION="16" setup_postgresql
|
||||
@ -55,13 +54,11 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
||||
} >>~/docspell.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
|
||||
fetch_and_deploy_gh_release "docspell-joex" "eikek/docspell" "binary" "latest" "/opt/docspell-joex" "docspell-joex_*all.deb"
|
||||
fetch_and_deploy_gh_release "docspell-restserver" "eikek/docspell" "binary" "latest" "/opt/docspell-restserver" "docspell-restserver_*all.deb"
|
||||
fetch_and_deploy_gh_release "docspell-dsc" "docspell/dsc" "singlefile" "latest" "/usr/bin" "dsc"
|
||||
fetch_and_deploy_gh_release "apache-solr" "apache/solr" "tarball" "latest" "/opt/docspell"
|
||||
|
||||
|
||||
msg_info "Setup Docspell"
|
||||
ln -s /etc/docspell-joex /opt/docspell/docspell-joex && ln -s /etc/docspell-restserver /opt/docspell/docspell-restserver && ln -s /usr/bin/dsc /opt/docspell/dsc
|
||||
sed -i \
|
||||
|
@ -8,18 +8,18 @@
|
||||
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 \
|
||||
libsodium23 \
|
||||
libsodium-dev \
|
||||
pkg-config \
|
||||
caddy \
|
||||
gcc
|
||||
libsodium23 \
|
||||
libsodium-dev \
|
||||
pkg-config \
|
||||
caddy \
|
||||
gcc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
@ -37,10 +37,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 "Ente Credentials"
|
||||
echo "Database Name: $DB_NAME"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Ente Credentials"
|
||||
echo "Database Name: $DB_NAME"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
} >>~/ente.creds
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
@ -52,10 +52,10 @@ export CGO_ENABLED=1
|
||||
CGO_CFLAGS="$(pkg-config --cflags libsodium || true)"
|
||||
CGO_LDFLAGS="$(pkg-config --libs libsodium || true)"
|
||||
if [ -z "$CGO_CFLAGS" ]; then
|
||||
CGO_CFLAGS="-I/usr/include"
|
||||
CGO_CFLAGS="-I/usr/include"
|
||||
fi
|
||||
if [ -z "$CGO_LDFLAGS" ]; then
|
||||
CGO_LDFLAGS="-lsodium"
|
||||
CGO_LDFLAGS="-lsodium"
|
||||
fi
|
||||
export CGO_CFLAGS
|
||||
export CGO_LDFLAGS
|
||||
|
@ -12,7 +12,7 @@ INSTALL_PATH="/opt/sng_freepbx_debian_install.sh"
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
init_error_traps
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
@ -24,80 +24,80 @@ msg_ok "Remove Firewall module is set to: $REMOVE_FIREWALL"
|
||||
|
||||
msg_info "Downloading FreePBX installation script..."
|
||||
if curl -fsSL "$INSTALL_URL" -o "$INSTALL_PATH"; then
|
||||
msg_ok "Download completed successfully"
|
||||
msg_ok "Download completed successfully"
|
||||
else
|
||||
curl_exit_code=$?
|
||||
msg_error "Error downloading FreePBX installation script (curl exit code: $curl_exit_code)"
|
||||
msg_error "Aborting!"
|
||||
exit 1
|
||||
curl_exit_code=$?
|
||||
msg_error "Error downloading FreePBX installation script (curl exit code: $curl_exit_code)"
|
||||
msg_error "Aborting!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$VERBOSE" == "yes" ]]; then
|
||||
msg_info "Installing FreePBX (Verbose)\n"
|
||||
msg_info "Installing FreePBX (Verbose)\n"
|
||||
else
|
||||
msg_info "Installing FreePBX, be patient, this takes time..."
|
||||
msg_info "Installing FreePBX, be patient, this takes time..."
|
||||
fi
|
||||
$STD bash "$INSTALL_PATH"
|
||||
|
||||
if [[ $ONLY_OPENSOURCE == "yes" ]]; then
|
||||
msg_info "Removing Commercial modules..."
|
||||
msg_info "Removing Commercial modules..."
|
||||
|
||||
end_count=0
|
||||
max=5
|
||||
count=0
|
||||
while fwconsole ma list | awk '/Commercial/ {found=1} END {exit !found}'; do
|
||||
count=$((count + 1))
|
||||
while read -r module; do
|
||||
msg_info "Removing module: $module"
|
||||
end_count=0
|
||||
max=5
|
||||
count=0
|
||||
while fwconsole ma list | awk '/Commercial/ {found=1} END {exit !found}'; do
|
||||
count=$((count + 1))
|
||||
while read -r module; do
|
||||
msg_info "Removing module: $module"
|
||||
|
||||
if [[ "$REMOVE_FIREWALL" == "no" ]] && [[ "$module" == "sysadmin" ]]; then
|
||||
msg_warn "Skipping sysadmin module removal, it is required for Firewall!"
|
||||
continue
|
||||
fi
|
||||
if [[ "$REMOVE_FIREWALL" == "no" ]] && [[ "$module" == "sysadmin" ]]; then
|
||||
msg_warn "Skipping sysadmin module removal, it is required for Firewall!"
|
||||
continue
|
||||
fi
|
||||
|
||||
code=0
|
||||
$STD fwconsole ma -f remove $module || code=$?
|
||||
if [[ $code -ne 0 ]]; then
|
||||
msg_error "Module $module could not be removed - error code $code"
|
||||
else
|
||||
msg_ok "Module $module removed successfully"
|
||||
fi
|
||||
done < <(fwconsole ma list | awk '/Commercial/ {print $2}')
|
||||
code=0
|
||||
$STD fwconsole ma -f remove $module || code=$?
|
||||
if [[ $code -ne 0 ]]; then
|
||||
msg_error "Module $module could not be removed - error code $code"
|
||||
else
|
||||
msg_ok "Module $module removed successfully"
|
||||
fi
|
||||
done < <(fwconsole ma list | awk '/Commercial/ {print $2}')
|
||||
|
||||
[[ $count -ge $max ]] && break
|
||||
[[ $count -ge $max ]] && break
|
||||
|
||||
com_list=$(fwconsole ma list)
|
||||
end_count=$(awk '/Commercial/ {count++} END {print count + 0}' <<< "$com_list")
|
||||
awk '/Commercial/ {found=1} END {exit !found}' <<< "$com_list" || break
|
||||
if [[ "$REMOVE_FIREWALL" == "no" ]] && \
|
||||
[[ $end_count -eq 1 ]] && \
|
||||
[[ $(awk '/Commercial/ {print $2}' <<< "$com_list") == "sysadmin" ]]; then
|
||||
break
|
||||
com_list=$(fwconsole ma list)
|
||||
end_count=$(awk '/Commercial/ {count++} END {print count + 0}' <<<"$com_list")
|
||||
awk '/Commercial/ {found=1} END {exit !found}' <<<"$com_list" || break
|
||||
if [[ "$REMOVE_FIREWALL" == "no" ]] &&
|
||||
[[ $end_count -eq 1 ]] &&
|
||||
[[ $(awk '/Commercial/ {print $2}' <<<"$com_list") == "sysadmin" ]]; then
|
||||
break
|
||||
fi
|
||||
|
||||
msg_warn "Not all commercial modules could be removed, retrying (attempt $count of $max)..."
|
||||
done
|
||||
|
||||
if [[ $REMOVE_FIREWALL == "yes" ]] && [[ $end_count -gt 0 ]]; then
|
||||
msg_info "Removing Firewall module..."
|
||||
if $STD fwconsole ma -f remove firewall; then
|
||||
msg_ok "Firewall module removed successfully"
|
||||
else
|
||||
msg_error "Firewall module could not be removed, please check manually!"
|
||||
fi
|
||||
fi
|
||||
|
||||
msg_warn "Not all commercial modules could be removed, retrying (attempt $count of $max)..."
|
||||
done
|
||||
|
||||
if [[ $REMOVE_FIREWALL == "yes" ]] && [[ $end_count -gt 0 ]]; then
|
||||
msg_info "Removing Firewall module..."
|
||||
if $STD fwconsole ma -f remove firewall; then
|
||||
msg_ok "Firewall module removed successfully"
|
||||
if [[ $end_count -eq 0 ]]; then
|
||||
msg_ok "All commercial modules removed successfully"
|
||||
elif [[ $end_count -eq 1 ]] && [[ $REMOVE_FIREWALL == "no" ]] && [[ $(fwconsole ma list | awk '/Commercial/ {print $2}') == "sysadmin" ]]; then
|
||||
msg_ok "Only sysadmin module left, which is required for Firewall, skipping removal"
|
||||
else
|
||||
msg_error "Firewall module could not be removed, please check manually!"
|
||||
msg_warn "Some commercial modules could not be removed, please check the web interface for removal manually!"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $end_count -eq 0 ]]; then
|
||||
msg_ok "All commercial modules removed successfully"
|
||||
elif [[ $end_count -eq 1 ]] && [[ $REMOVE_FIREWALL == "no" ]] && [[ $(fwconsole ma list | awk '/Commercial/ {print $2}') == "sysadmin" ]]; then
|
||||
msg_ok "Only sysadmin module left, which is required for Firewall, skipping removal"
|
||||
else
|
||||
msg_warn "Some commercial modules could not be removed, please check the web interface for removal manually!"
|
||||
fi
|
||||
|
||||
msg_info "Reloading FreePBX..."
|
||||
$STD fwconsole reload
|
||||
msg_ok "FreePBX reloaded completely"
|
||||
msg_info "Reloading FreePBX..."
|
||||
$STD fwconsole reload
|
||||
msg_ok "FreePBX reloaded completely"
|
||||
fi
|
||||
msg_ok "Installed FreePBX finished"
|
||||
|
||||
|
@ -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
|
||||
@ -84,9 +84,9 @@ EOF
|
||||
mkdir -p /config
|
||||
ln -sf /config/config.yml /opt/frigate/config/config.yml
|
||||
if [[ "$CTTYPE" == "0" ]]; then
|
||||
sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/kvm:x:105:/' /etc/group
|
||||
sed -i -e 's/^kvm:x:104:$/render:x:104:root,frigate/' -e 's/^render:x:105:root$/kvm:x:105:/' /etc/group
|
||||
else
|
||||
sed -i -e 's/^kvm:x:104:$/render:x:104:frigate/' -e 's/^render:x:105:$/kvm:x:105:/' /etc/group
|
||||
sed -i -e 's/^kvm:x:104:$/render:x:104:frigate/' -e 's/^render:x:105:$/kvm:x:105:/' /etc/group
|
||||
fi
|
||||
echo "tmpfs /tmp/cache tmpfs defaults 0 0" >>/etc/fstab
|
||||
mkdir -p /media/frigate
|
||||
@ -97,18 +97,18 @@ EOF
|
||||
msg_ok "Config ready"
|
||||
|
||||
if grep -q -o -m1 -E 'avx[^ ]*' /proc/cpuinfo; then
|
||||
msg_ok "AVX Support Detected"
|
||||
msg_info "Installing Openvino Object Detection Model (Resilience)"
|
||||
$STD pip install -r /opt/frigate/docker/main/requirements-ov.txt
|
||||
cd /opt/frigate/models
|
||||
export ENABLE_ANALYTICS=NO
|
||||
$STD /usr/local/bin/omz_downloader --name ssdlite_mobilenet_v2 --num_attempts 2
|
||||
$STD /usr/local/bin/omz_converter --name ssdlite_mobilenet_v2 --precision FP16 --mo /usr/local/bin/mo
|
||||
cd /
|
||||
cp -r /opt/frigate/models/public/ssdlite_mobilenet_v2 openvino-model
|
||||
curl -fsSL "https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/dataset_classes/coco_91cl_bkgr.txt" -o "openvino-model/coco_91cl_bkgr.txt"
|
||||
sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt
|
||||
cat <<EOF >>/config/config.yml
|
||||
msg_ok "AVX Support Detected"
|
||||
msg_info "Installing Openvino Object Detection Model (Resilience)"
|
||||
$STD pip install -r /opt/frigate/docker/main/requirements-ov.txt
|
||||
cd /opt/frigate/models
|
||||
export ENABLE_ANALYTICS=NO
|
||||
$STD /usr/local/bin/omz_downloader --name ssdlite_mobilenet_v2 --num_attempts 2
|
||||
$STD /usr/local/bin/omz_converter --name ssdlite_mobilenet_v2 --precision FP16 --mo /usr/local/bin/mo
|
||||
cd /
|
||||
cp -r /opt/frigate/models/public/ssdlite_mobilenet_v2 openvino-model
|
||||
curl -fsSL "https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/dataset_classes/coco_91cl_bkgr.txt" -o "openvino-model/coco_91cl_bkgr.txt"
|
||||
sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt
|
||||
cat <<EOF >>/config/config.yml
|
||||
detectors:
|
||||
ov:
|
||||
type: openvino
|
||||
@ -122,9 +122,9 @@ model:
|
||||
input_pixel_format: bgr
|
||||
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
|
||||
EOF
|
||||
msg_ok "Installed Openvino Object Detection Model"
|
||||
msg_ok "Installed Openvino Object Detection Model"
|
||||
else
|
||||
cat <<EOF >>/config/config.yml
|
||||
cat <<EOF >>/config/config.yml
|
||||
model:
|
||||
path: /cpu_model.tflite
|
||||
EOF
|
||||
|
@ -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
|
||||
@ -77,9 +77,9 @@ $STD grafana-cli plugins install marcusolsson-hourly-heatmap-panel
|
||||
$STD systemctl restart grafana-server
|
||||
# Output credentials to file
|
||||
{
|
||||
echo "Grafana Credentials"
|
||||
echo "Grafana User: ${GRAFANA_USER}"
|
||||
echo "Grafana Password: ${GRAFANA_PASS}"
|
||||
echo "Grafana Credentials"
|
||||
echo "Grafana User: ${GRAFANA_USER}"
|
||||
echo "Grafana Password: ${GRAFANA_PASS}"
|
||||
} >>~/garmin-grafana.creds
|
||||
msg_ok "Set up Grafana"
|
||||
|
||||
@ -90,7 +90,7 @@ curl -fsSL -o "${RELEASE}.zip" "https://github.com/arpanghosh8453/garmin-grafana
|
||||
unzip -q "${RELEASE}.zip"
|
||||
# Remove the v prefix to RELEASE if it exists
|
||||
if [[ "${RELEASE}" == v* ]]; then
|
||||
RELEASE="${RELEASE:1}"
|
||||
RELEASE="${RELEASE:1}"
|
||||
fi
|
||||
mv "garmin-grafana-${RELEASE}/" "/opt/garmin-grafana"
|
||||
mkdir -p /opt/garmin-grafana/.garminconnect
|
||||
@ -112,9 +112,9 @@ msg_info "Setting up garmin-grafana"
|
||||
# Check if using Chinese garmin servers
|
||||
read -rp "Are you using Garmin in mainland China? (y/N): " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then
|
||||
GARMIN_CN="True"
|
||||
GARMIN_CN="True"
|
||||
else
|
||||
GARMIN_CN="False"
|
||||
GARMIN_CN="False"
|
||||
fi
|
||||
|
||||
cat <<EOF >/opt/garmin-grafana/.env
|
||||
@ -131,24 +131,24 @@ EOF
|
||||
# garmin-grafana usually prompts the user for email and password (and MFA) on first run,
|
||||
# then stores a refreshable token. We try to avoid storing user credentials in the env vars
|
||||
if [ -z "$(ls -A /opt/garmin-grafana/.garminconnect)" ]; then
|
||||
read -r -p "Please enter your Garmin Connect Email: " GARMIN_EMAIL
|
||||
read -r -p "Please enter your Garmin Connect Password (this is used to generate a token and NOT stored): " GARMIN_PASSWORD
|
||||
read -r -p "Please enter your MFA Code (if applicable, leave blank if not): " GARMIN_MFA
|
||||
# Run the script once to prompt for credential
|
||||
msg_info "Creating Garmin credentials, this will timeout in 60 seconds"
|
||||
timeout 60s uv run --env-file /opt/garmin-grafana/.env --project /opt/garmin-grafana/ /opt/garmin-grafana/src/garmin_grafana/garmin_fetch.py <<EOF
|
||||
read -r -p "Please enter your Garmin Connect Email: " GARMIN_EMAIL
|
||||
read -r -p "Please enter your Garmin Connect Password (this is used to generate a token and NOT stored): " GARMIN_PASSWORD
|
||||
read -r -p "Please enter your MFA Code (if applicable, leave blank if not): " GARMIN_MFA
|
||||
# Run the script once to prompt for credential
|
||||
msg_info "Creating Garmin credentials, this will timeout in 60 seconds"
|
||||
timeout 60s uv run --env-file /opt/garmin-grafana/.env --project /opt/garmin-grafana/ /opt/garmin-grafana/src/garmin_grafana/garmin_fetch.py <<EOF
|
||||
${GARMIN_EMAIL}
|
||||
${GARMIN_PASSWORD}
|
||||
${GARMIN_MFA}
|
||||
EOF
|
||||
unset GARMIN_EMAIL
|
||||
unset GARMIN_PASSWORD
|
||||
unset GARMIN_MFA
|
||||
# Check if there is anything in the token dir now
|
||||
if [ -z "$(ls -A /opt/garmin-grafana/.garminconnect)" ]; then
|
||||
msg_error "Failed to create a token"
|
||||
exit
|
||||
fi
|
||||
unset GARMIN_EMAIL
|
||||
unset GARMIN_PASSWORD
|
||||
unset GARMIN_MFA
|
||||
# Check if there is anything in the token dir now
|
||||
if [ -z "$(ls -A /opt/garmin-grafana/.garminconnect)" ]; then
|
||||
msg_error "Failed to create a token"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
$STD systemctl restart grafana-server
|
||||
|
@ -8,18 +8,18 @@
|
||||
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 \
|
||||
python3 \
|
||||
openssl \
|
||||
curl \
|
||||
ca-certificates
|
||||
build-essential \
|
||||
python3 \
|
||||
openssl \
|
||||
curl \
|
||||
ca-certificates
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="15" setup_postgresql
|
||||
@ -45,21 +45,21 @@ $STD sudo -u postgres psql -d $DB_NAME -c "GRANT CREATE ON SCHEMA public TO $DB_
|
||||
$STD sudo -u postgres psql -d $DB_NAME -c "ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO $DB_USER;"
|
||||
$STD sudo -u postgres psql -d $DB_NAME -c "ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO $DB_USER;"
|
||||
{
|
||||
echo "Ghostfolio Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
echo "Redis Password: $REDIS_PASS"
|
||||
echo "Access Token Salt: $ACCESS_TOKEN_SALT"
|
||||
echo "JWT Secret Key: $JWT_SECRET_KEY"
|
||||
if [[ -n "${COINGECKO_DEMO_KEY:-}" ]]; then
|
||||
echo "CoinGecko Demo API Key: $COINGECKO_DEMO_KEY"
|
||||
fi
|
||||
if [[ -n "${COINGECKO_PRO_KEY:-}" ]]; then
|
||||
echo "CoinGecko Pro API Key: $COINGECKO_PRO_KEY"
|
||||
fi
|
||||
echo ""
|
||||
echo "To add CoinGecko API keys later, edit: /opt/ghostfolio/.env"
|
||||
echo "Ghostfolio Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
echo "Redis Password: $REDIS_PASS"
|
||||
echo "Access Token Salt: $ACCESS_TOKEN_SALT"
|
||||
echo "JWT Secret Key: $JWT_SECRET_KEY"
|
||||
if [[ -n "${COINGECKO_DEMO_KEY:-}" ]]; then
|
||||
echo "CoinGecko Demo API Key: $COINGECKO_DEMO_KEY"
|
||||
fi
|
||||
if [[ -n "${COINGECKO_PRO_KEY:-}" ]]; then
|
||||
echo "CoinGecko Pro API Key: $COINGECKO_PRO_KEY"
|
||||
fi
|
||||
echo ""
|
||||
echo "To add CoinGecko API keys later, edit: /opt/ghostfolio/.env"
|
||||
} >>~/ghostfolio.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
@ -101,11 +101,11 @@ HOST=0.0.0.0
|
||||
EOF
|
||||
|
||||
if [[ -n "${COINGECKO_DEMO_KEY:-}" ]]; then
|
||||
echo "API_KEY_COINGECKO_DEMO=$COINGECKO_DEMO_KEY" >>/opt/ghostfolio/.env
|
||||
echo "API_KEY_COINGECKO_DEMO=$COINGECKO_DEMO_KEY" >>/opt/ghostfolio/.env
|
||||
fi
|
||||
|
||||
if [[ -n "${COINGECKO_PRO_KEY:-}" ]]; then
|
||||
echo "API_KEY_COINGECKO_PRO=$COINGECKO_PRO_KEY" >>/opt/ghostfolio/.env
|
||||
echo "API_KEY_COINGECKO_PRO=$COINGECKO_PRO_KEY" >>/opt/ghostfolio/.env
|
||||
fi
|
||||
msg_ok "Set up Environment"
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
init_error_traps
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
@ -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
|
||||
@ -28,10 +28,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 "Hanko-Credentials"
|
||||
echo "Hanko Database User: $DB_USER"
|
||||
echo "Hanko Database Password: $DB_PASS"
|
||||
echo "Hanko Database Name: $DB_NAME"
|
||||
echo "Hanko-Credentials"
|
||||
echo "Hanko Database User: $DB_USER"
|
||||
echo "Hanko Database Password: $DB_PASS"
|
||||
echo "Hanko Database Name: $DB_NAME"
|
||||
} >>~/hanko.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
@ -39,7 +39,7 @@ msg_info "Setup Hanko"
|
||||
fetch_and_deploy_gh_release "hanko" "teamhanko/hanko" "prebuild" "latest" "/opt/hanko" "hanko_Linux_x86_64.tar.gz"
|
||||
curl -fsSL https://raw.githubusercontent.com/teamhanko/hanko/refs/heads/main/backend/config/config.yaml -o /opt/hanko/config.yaml
|
||||
env DB_USER="$DB_USER" DB_PASS="$DB_PASS" APP_SECRET="$APP_SECRET" \
|
||||
yq eval '
|
||||
yq eval '
|
||||
.database.user = strenv(DB_USER) |
|
||||
.database.password = strenv(DB_PASS) |
|
||||
.database.host = "localhost" |
|
||||
|
@ -8,15 +8,15 @@
|
||||
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 \
|
||||
git \
|
||||
rsync
|
||||
git \
|
||||
rsync
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
@ -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 "Joplin-Credentials"
|
||||
echo "Joplin Database User: $DB_USER"
|
||||
echo "Joplin Database Password: $DB_PASS"
|
||||
echo "Joplin Database Name: $DB_NAME"
|
||||
echo "Joplin-Credentials"
|
||||
echo "Joplin Database User: $DB_USER"
|
||||
echo "Joplin Database Password: $DB_PASS"
|
||||
echo "Joplin Database Name: $DB_NAME"
|
||||
} >>~/joplin.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
|
@ -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
|
||||
@ -29,10 +29,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 "Kanba-Credentials"
|
||||
echo "Kanba Database Name: $DB_NAME"
|
||||
echo "Kanba Database User: $DB_USER"
|
||||
echo "Kanba Database Password: $DB_PASS"
|
||||
echo "Kanba-Credentials"
|
||||
echo "Kanba Database Name: $DB_NAME"
|
||||
echo "Kanba Database User: $DB_USER"
|
||||
echo "Kanba Database Password: $DB_PASS"
|
||||
} >>~/kanba.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
|
@ -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
|
||||
@ -24,10 +24,10 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "Leantime Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
echo "Leantime Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/leantime.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
@ -59,10 +59,10 @@ cat <<EOF >/etc/apache2/sites-enabled/000-default.conf
|
||||
EOF
|
||||
mv "/opt/leantime/config/sample.env" "/opt/leantime/config/.env"
|
||||
sed -i -e "s|^LEAN_DB_DATABASE.*|LEAN_DB_DATABASE = '$DB_NAME'|" \
|
||||
-e "s|^LEAN_DB_USER.*|LEAN_DB_USER = '$DB_USER'|" \
|
||||
-e "s|^LEAN_DB_PASSWORD.*|LEAN_DB_PASSWORD = '$DB_PASS'|" \
|
||||
-e "s|^LEAN_SESSION_PASSWORD.*|LEAN_SESSION_PASSWORD = '$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)'|" \
|
||||
"/opt/leantime/config/.env"
|
||||
-e "s|^LEAN_DB_USER.*|LEAN_DB_USER = '$DB_USER'|" \
|
||||
-e "s|^LEAN_DB_PASSWORD.*|LEAN_DB_PASSWORD = '$DB_PASS'|" \
|
||||
-e "s|^LEAN_SESSION_PASSWORD.*|LEAN_SESSION_PASSWORD = '$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)'|" \
|
||||
"/opt/leantime/config/.env"
|
||||
$STD a2enmod -q proxy_fcgi setenvif rewrite
|
||||
$STD a2enconf -q "php8.4-fpm"
|
||||
sed -i -e "s/^;extension.\(curl\|fileinfo\|gd\|intl\|ldap\|mbstring\|exif\|mysqli\|odbc\|openssl\|pdo_mysql\)/extension=\1/g" "/etc/php/8.4/apache2/php.ini"
|
||||
|
@ -8,25 +8,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"
|
||||
$STD apt-get install -y \
|
||||
lsb-release \
|
||||
ca-certificates \
|
||||
acl \
|
||||
fping \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
mtr-tiny \
|
||||
nginx \
|
||||
nmap \
|
||||
rrdtool \
|
||||
snmp \
|
||||
snmpd
|
||||
lsb-release \
|
||||
ca-certificates \
|
||||
acl \
|
||||
fping \
|
||||
graphviz \
|
||||
imagemagick \
|
||||
mtr-tiny \
|
||||
nginx \
|
||||
nmap \
|
||||
rrdtool \
|
||||
snmp \
|
||||
snmpd
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="gmp,mysql,snmp" setup_php
|
||||
@ -36,7 +36,7 @@ PYTHON_VERSION="3.13" setup_uv
|
||||
|
||||
msg_info "Installing Python"
|
||||
$STD apt-get install -y \
|
||||
python3-{dotenv,pymysql,redis,setuptools,systemd,pip}
|
||||
python3-{dotenv,pymysql,redis,setuptools,systemd,pip}
|
||||
msg_ok "Installed Python"
|
||||
|
||||
msg_info "Configuring Database"
|
||||
@ -47,10 +47,10 @@ $STD mariadb -u root -e "CREATE DATABASE $DB_NAME CHARACTER SET utf8mb4 COLLATE
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "LibreNMS-Credentials"
|
||||
echo "LibreNMS Database User: $DB_USER"
|
||||
echo "LibreNMS Database Password: $DB_PASS"
|
||||
echo "LibreNMS Database Name: $DB_NAME"
|
||||
echo "LibreNMS-Credentials"
|
||||
echo "LibreNMS Database User: $DB_USER"
|
||||
echo "LibreNMS Database Password: $DB_PASS"
|
||||
echo "LibreNMS Database Name: $DB_NAME"
|
||||
} >>~/librenms.creds
|
||||
msg_ok "Configured Database"
|
||||
|
||||
|
@ -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
|
||||
@ -47,7 +47,7 @@ $STD mix local.hex --force
|
||||
$STD mix local.rebar --force
|
||||
$STD mix escript.install hex livebook --force
|
||||
|
||||
cat <<EOF > /opt/livebook/.env
|
||||
cat <<EOF >/opt/livebook/.env
|
||||
export HOME=/opt/livebook
|
||||
export ERLANG_VERSION=$ERLANG_VERSION
|
||||
export ELIXIR_VERSION=$ELIXIR_VERSION
|
||||
@ -89,7 +89,7 @@ systemctl enable -q --now livebook
|
||||
msg_ok "Installed Livebook"
|
||||
|
||||
msg_info "Saving Livebook credentials"
|
||||
cat <<EOF > /opt/livebook/livebook.creds
|
||||
cat <<EOF >/opt/livebook/livebook.creds
|
||||
Livebook-Credentials
|
||||
Livebook Password: $LIVEBOOK_PASSWORD
|
||||
EOF
|
||||
|
@ -7,23 +7,23 @@
|
||||
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 \
|
||||
lsb-release \
|
||||
rbenv \
|
||||
libpq-dev \
|
||||
libarchive-dev \
|
||||
git \
|
||||
libmariadb-dev \
|
||||
redis-server \
|
||||
nginx \
|
||||
libffi-dev \
|
||||
libyaml-dev
|
||||
lsb-release \
|
||||
rbenv \
|
||||
libpq-dev \
|
||||
libarchive-dev \
|
||||
git \
|
||||
libmariadb-dev \
|
||||
redis-server \
|
||||
nginx \
|
||||
libffi-dev \
|
||||
libyaml-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="16" setup_postgresql
|
||||
@ -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 "Manyfold Credentials"
|
||||
echo "Manyfold Database User: $DB_USER"
|
||||
echo "Manyfold Database Password: $DB_PASS"
|
||||
echo "Manyfold Database Name: $DB_NAME"
|
||||
echo "Manyfold Credentials"
|
||||
echo "Manyfold Database User: $DB_USER"
|
||||
echo "Manyfold Database Password: $DB_PASS"
|
||||
echo "Manyfold Database Name: $DB_NAME"
|
||||
} >>~/manyfold.creds
|
||||
msg_ok "Set up PostgreSQL"
|
||||
|
||||
|
@ -8,37 +8,37 @@
|
||||
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 \
|
||||
openssl \
|
||||
redis \
|
||||
libgbm1 \
|
||||
libnss3 \
|
||||
libatk1.0-0 \
|
||||
libatk-bridge2.0-0 \
|
||||
libdrm2 \
|
||||
libxkbcommon0 \
|
||||
libglib2.0-0 \
|
||||
libdbus-1-3 \
|
||||
libx11-xcb1 \
|
||||
libxcb1 \
|
||||
libxcomposite1 \
|
||||
libxcursor1 \
|
||||
libxdamage1 \
|
||||
libxext6 \
|
||||
libxi6 \
|
||||
libxtst6 \
|
||||
ca-certificates \
|
||||
libxrandr2 \
|
||||
libasound2 \
|
||||
libxss1 \
|
||||
libxinerama1 \
|
||||
nginx
|
||||
openssl \
|
||||
redis \
|
||||
libgbm1 \
|
||||
libnss3 \
|
||||
libatk1.0-0 \
|
||||
libatk-bridge2.0-0 \
|
||||
libdrm2 \
|
||||
libxkbcommon0 \
|
||||
libglib2.0-0 \
|
||||
libdbus-1-3 \
|
||||
libx11-xcb1 \
|
||||
libxcb1 \
|
||||
libxcomposite1 \
|
||||
libxcursor1 \
|
||||
libxdamage1 \
|
||||
libxext6 \
|
||||
libxi6 \
|
||||
libxtst6 \
|
||||
ca-certificates \
|
||||
libxrandr2 \
|
||||
libasound2 \
|
||||
libxss1 \
|
||||
libxinerama1 \
|
||||
nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION=17 setup_postgresql
|
||||
@ -63,13 +63,13 @@ $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 "Maxun-Credentials"
|
||||
echo "Maxun Database User: $DB_USER"
|
||||
echo "Maxun Database Password: $DB_PASS"
|
||||
echo "Maxun Database Name: $DB_NAME"
|
||||
echo "Maxun JWT Secret: $JWT_SECRET"
|
||||
echo "Maxun Encryption Key: $ENCRYPTION_KEY"
|
||||
echo "Maxun Session Secret: $SESSION_SECRET"
|
||||
echo "Maxun-Credentials"
|
||||
echo "Maxun Database User: $DB_USER"
|
||||
echo "Maxun Database Password: $DB_PASS"
|
||||
echo "Maxun Database Name: $DB_NAME"
|
||||
echo "Maxun JWT Secret: $JWT_SECRET"
|
||||
echo "Maxun Encryption Key: $ENCRYPTION_KEY"
|
||||
echo "Maxun Session Secret: $SESSION_SECRET"
|
||||
} >>~/maxun.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
@ -98,9 +98,9 @@ LimitNOFILE=65536
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
{
|
||||
echo "__________________"
|
||||
echo "MinIO Admin User: $MINIO_USER"
|
||||
echo "MinIO Admin Password: $MINIO_PASS"
|
||||
echo "__________________"
|
||||
echo "MinIO Admin User: $MINIO_USER"
|
||||
echo "MinIO Admin Password: $MINIO_PASS"
|
||||
} >>~/maxun.creds
|
||||
cat <<EOF >/etc/default/minio
|
||||
MINIO_ROOT_USER=${MINIO_USER}
|
||||
|
@ -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 \
|
||||
make \
|
||||
git \
|
||||
caddy
|
||||
make \
|
||||
git \
|
||||
caddy
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||
|
@ -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 apk add \
|
||||
tzdata \
|
||||
gawk \
|
||||
yq
|
||||
tzdata \
|
||||
gawk \
|
||||
yq
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Docker & Compose"
|
||||
@ -26,7 +26,7 @@ $STD rc-service docker start
|
||||
$STD rc-update add docker default
|
||||
|
||||
get_latest_release() {
|
||||
curl -fsSL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4
|
||||
curl -fsSL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4
|
||||
}
|
||||
DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
|
||||
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||
@ -42,17 +42,17 @@ msg_ok "Fetched NPMplus"
|
||||
|
||||
attempts=0
|
||||
while true; do
|
||||
read -r -p "${TAB3}Enter your TZ Identifier (e.g., Europe/Berlin): " TZ_INPUT
|
||||
if validate_tz "$TZ_INPUT"; then
|
||||
break
|
||||
fi
|
||||
msg_error "Invalid timezone! Please enter a valid TZ identifier."
|
||||
read -r -p "${TAB3}Enter your TZ Identifier (e.g., Europe/Berlin): " TZ_INPUT
|
||||
if validate_tz "$TZ_INPUT"; then
|
||||
break
|
||||
fi
|
||||
msg_error "Invalid timezone! Please enter a valid TZ identifier."
|
||||
|
||||
attempts=$((attempts + 1))
|
||||
if [[ "$attempts" -ge 3 ]]; then
|
||||
msg_error "Maximum attempts reached. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
attempts=$((attempts + 1))
|
||||
if [[ "$attempts" -ge 3 ]]; then
|
||||
msg_error "Maximum attempts reached. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
read -r -p "${TAB3}Enter your ACME Email: " ACME_EMAIL_INPUT
|
||||
@ -67,20 +67,20 @@ msg_info "Building and Starting NPMplus (Patience)"
|
||||
$STD docker compose up -d
|
||||
CONTAINER_ID=""
|
||||
for i in {1..60}; do
|
||||
CONTAINER_ID=$(docker ps --filter "name=npmplus" --format "{{.ID}}")
|
||||
if [[ -n "$CONTAINER_ID" ]]; then
|
||||
STATUS=$(docker inspect --format '{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || echo "starting")
|
||||
if [[ "$STATUS" == "healthy" ]]; then
|
||||
msg_ok "NPMplus is running and healthy"
|
||||
break
|
||||
elif [[ "$STATUS" == "unhealthy" ]]; then
|
||||
msg_error "NPMplus container is unhealthy! Check logs."
|
||||
docker logs "$CONTAINER_ID"
|
||||
exit 1
|
||||
CONTAINER_ID=$(docker ps --filter "name=npmplus" --format "{{.ID}}")
|
||||
if [[ -n "$CONTAINER_ID" ]]; then
|
||||
STATUS=$(docker inspect --format '{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || echo "starting")
|
||||
if [[ "$STATUS" == "healthy" ]]; then
|
||||
msg_ok "NPMplus is running and healthy"
|
||||
break
|
||||
elif [[ "$STATUS" == "unhealthy" ]]; then
|
||||
msg_error "NPMplus container is unhealthy! Check logs."
|
||||
docker logs "$CONTAINER_ID"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
sleep 2
|
||||
[[ $i -eq 60 ]] && msg_error "NPMplus container did not become healthy within 120s." && docker logs "$CONTAINER_ID" && exit 1
|
||||
sleep 2
|
||||
[[ $i -eq 60 ]] && msg_error "NPMplus container did not become healthy within 120s." && docker logs "$CONTAINER_ID" && exit 1
|
||||
done
|
||||
msg_ok "Builded and started NPMplus"
|
||||
|
||||
@ -91,34 +91,34 @@ msg_info "Retrieving Default Login (Patience)"
|
||||
PASSWORD_FOUND=0
|
||||
|
||||
for i in {1..60}; do
|
||||
PASSWORD_LINE=$(
|
||||
{ awk '/Creating a new user:/{print; exit}' < <(docker logs "$CONTAINER_ID" 2>&1); } || true
|
||||
)
|
||||
PASSWORD_LINE=$(
|
||||
{ awk '/Creating a new user:/{print; exit}' < <(docker logs "$CONTAINER_ID" 2>&1); } || true
|
||||
)
|
||||
|
||||
if [[ -n "${PASSWORD_LINE:-}" ]]; then
|
||||
PASSWORD="${PASSWORD_LINE#*password: }"
|
||||
printf 'username: admin@example.org\npassword: %s\n' "$PASSWORD" >/opt/.npm_pwd
|
||||
msg_ok "Saved default login to /opt/.npm_pwd"
|
||||
PASSWORD_FOUND=1
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
if [[ -n "${PASSWORD_LINE:-}" ]]; then
|
||||
PASSWORD="${PASSWORD_LINE#*password: }"
|
||||
printf 'username: admin@example.org\npassword: %s\n' "$PASSWORD" >/opt/.npm_pwd
|
||||
msg_ok "Saved default login to /opt/.npm_pwd"
|
||||
PASSWORD_FOUND=1
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
if [[ $PASSWORD_FOUND -eq 0 ]]; then
|
||||
PASSWORD_LINE=$(
|
||||
timeout 30s bash -c '
|
||||
PASSWORD_LINE=$(
|
||||
timeout 30s bash -c '
|
||||
docker logs -f --since=0s --tail=0 "$1" 2>&1 | awk "/Creating a new user:/{print; exit}"
|
||||
' _ "$CONTAINER_ID" || true
|
||||
)
|
||||
if [[ -n "${PASSWORD_LINE:-}" ]]; then
|
||||
PASSWORD="${PASSWORD_LINE#*password: }"
|
||||
printf 'username: admin@example.org\npassword: %s\n' "$PASSWORD" >/opt/.npm_pwd
|
||||
msg_ok "Saved default login to /opt/.npm_pwd (live)"
|
||||
PASSWORD_FOUND=1
|
||||
fi
|
||||
)
|
||||
if [[ -n "${PASSWORD_LINE:-}" ]]; then
|
||||
PASSWORD="${PASSWORD_LINE#*password: }"
|
||||
printf 'username: admin@example.org\npassword: %s\n' "$PASSWORD" >/opt/.npm_pwd
|
||||
msg_ok "Saved default login to /opt/.npm_pwd (live)"
|
||||
PASSWORD_FOUND=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $PASSWORD_FOUND -eq 0 ]]; then
|
||||
msg_error "Could not retrieve default login after 120s."
|
||||
echo -e "\nYou can manually check the container logs with:\n docker logs $CONTAINER_ID | grep 'Creating a new user:'\n"
|
||||
msg_error "Could not retrieve default login after 120s."
|
||||
echo -e "\nYou can manually check the container logs with:\n docker logs $CONTAINER_ID | grep 'Creating a new user:'\n"
|
||||
fi
|
||||
|
@ -8,22 +8,22 @@
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
init_error_traps
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
read -r -p "Enter the hostname of your OpenCloud server (eg cloud.domain.tld): " oc_host
|
||||
if [[ "$oc_host" ]]; then
|
||||
OC_HOST="$oc_host"
|
||||
OC_HOST="$oc_host"
|
||||
fi
|
||||
read -r -p "Enter the hostname of your Collabora server (eg collabora.domain.tld): " collabora_host
|
||||
if [[ "$collabora_host" ]]; then
|
||||
COLLABORA_HOST="$collabora_host"
|
||||
COLLABORA_HOST="$collabora_host"
|
||||
fi
|
||||
read -r -p "Enter the hostname of your WOPI server (eg wopiserver.domain.tld): " wopi_host
|
||||
if [[ "$wopi_host" ]]; then
|
||||
WOPI_HOST="$wopi_host"
|
||||
WOPI_HOST="$wopi_host"
|
||||
fi
|
||||
|
||||
msg_info "Installing Collabora Online"
|
||||
|
@ -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 \
|
||||
build-essential \
|
||||
python3-pip \
|
||||
supervisor \
|
||||
debian-keyring \
|
||||
debian-archive-keyring \
|
||||
apt-transport-https \
|
||||
redis
|
||||
build-essential \
|
||||
python3-pip \
|
||||
supervisor \
|
||||
debian-keyring \
|
||||
debian-archive-keyring \
|
||||
apt-transport-https \
|
||||
redis
|
||||
msg_ok "Installed dependencies"
|
||||
|
||||
NODE_VERSION="20" setup_nodejs
|
||||
@ -37,10 +37,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 "Postiz DB Credentials"
|
||||
echo "Postiz Database User: $DB_USER"
|
||||
echo "Postiz Database Password: $DB_PASS"
|
||||
echo "Postiz Database Name: $DB_NAME"
|
||||
echo "Postiz DB Credentials"
|
||||
echo "Postiz Database User: $DB_USER"
|
||||
echo "Postiz Database Password: $DB_PASS"
|
||||
echo "Postiz Database Name: $DB_NAME"
|
||||
} >>~/postiz.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
|
@ -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
|
||||
@ -19,9 +19,9 @@ echo "deb [signed-by=/usr/share/keyrings/proxmox-archive-keyring.gpg] http://dow
|
||||
$STD apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
$STD apt-get -o Dpkg::Options::="--force-confdef" \
|
||||
-o Dpkg::Options::="--force-confold" \
|
||||
install -y proxmox-datacenter-manager \
|
||||
proxmox-datacenter-manager-ui
|
||||
-o Dpkg::Options::="--force-confold" \
|
||||
install -y proxmox-datacenter-manager \
|
||||
proxmox-datacenter-manager-ui
|
||||
msg_ok "Installed Proxmox Datacenter Manager"
|
||||
|
||||
motd_ssh
|
||||
|
@ -9,27 +9,27 @@
|
||||
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 \
|
||||
acl \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
libffi-dev \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
libmariadb3 \
|
||||
libmariadb-dev \
|
||||
libpq-dev \
|
||||
redis-tools \
|
||||
p7zip \
|
||||
tzdata \
|
||||
jq
|
||||
acl \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
libffi-dev \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
libmariadb3 \
|
||||
libmariadb-dev \
|
||||
libpq-dev \
|
||||
redis-tools \
|
||||
p7zip \
|
||||
tzdata \
|
||||
jq
|
||||
msg_ok "Installed core dependencies"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
@ -44,10 +44,10 @@ $STD mariadb -u root -e "CREATE DATABASE IF NOT EXISTS $DB_NAME CHARACTER SET ut
|
||||
$STD mariadb -u root -e "CREATE USER IF NOT EXISTS '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "RomM-Credentials"
|
||||
echo "RomM Database User: $DB_USER"
|
||||
echo "RomM Database Password: $DB_PASS"
|
||||
echo "RomM Database Name: $DB_NAME"
|
||||
echo "RomM-Credentials"
|
||||
echo "RomM Database User: $DB_USER"
|
||||
echo "RomM Database Password: $DB_PASS"
|
||||
echo "RomM Database Name: $DB_NAME"
|
||||
} >~/romm.creds
|
||||
chmod 600 ~/romm.creds
|
||||
msg_ok "Configured Database"
|
||||
@ -55,11 +55,11 @@ msg_ok "Configured Database"
|
||||
msg_info "Creating romm user and directories"
|
||||
id -u romm &>/dev/null || useradd -r -m -d /var/lib/romm -s /bin/bash romm
|
||||
mkdir -p /opt/romm \
|
||||
/var/lib/romm/config \
|
||||
/var/lib/romm/resources \
|
||||
/var/lib/romm/assets/{saves,states,screenshots} \
|
||||
/var/lib/romm/library/roms/{gba,gbc,ps} \
|
||||
/var/lib/romm/library/bios/{gba,ps}
|
||||
/var/lib/romm/config \
|
||||
/var/lib/romm/resources \
|
||||
/var/lib/romm/assets/{saves,states,screenshots} \
|
||||
/var/lib/romm/library/roms/{gba,gbc,ps} \
|
||||
/var/lib/romm/library/bios/{gba,ps}
|
||||
chown -R romm:romm /opt/romm /var/lib/romm
|
||||
msg_ok "Created romm user and directories"
|
||||
|
||||
@ -71,10 +71,10 @@ $STD mariadb -u root -e "CREATE DATABASE $DB_NAME CHARACTER SET utf8mb4 COLLATE
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "RomM-Credentials"
|
||||
echo "RomM Database User: $DB_USER"
|
||||
echo "RomM Database Password: $DB_PASS"
|
||||
echo "RomM Database Name: $DB_NAME"
|
||||
echo "RomM-Credentials"
|
||||
echo "RomM Database User: $DB_USER"
|
||||
echo "RomM Database Password: $DB_PASS"
|
||||
echo "RomM Database Name: $DB_NAME"
|
||||
} >~/romm.creds
|
||||
msg_ok "Configured Database"
|
||||
|
||||
|
@ -8,19 +8,18 @@
|
||||
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 \
|
||||
caddy \
|
||||
apt-transport-https \
|
||||
ca-certificates
|
||||
caddy \
|
||||
apt-transport-https \
|
||||
ca-certificates
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
||||
setup_clickhouse
|
||||
PG_VERSION=17 setup_postgresql
|
||||
NODE_VERSION="20" NODE_MODULE="next" setup_nodejs
|
||||
@ -38,10 +37,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 "Rybbit-Credentials"
|
||||
echo "Rybbit Database User: $DB_USER"
|
||||
echo "Rybbit Database Password: $DB_PASS"
|
||||
echo "Rybbit Database Name: $DB_NAME"
|
||||
echo "Rybbit-Credentials"
|
||||
echo "Rybbit Database User: $DB_USER"
|
||||
echo "Rybbit Database Password: $DB_PASS"
|
||||
echo "Rybbit Database Name: $DB_NAME"
|
||||
} >>~/rybbit.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
|
@ -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
|
||||
|
@ -8,15 +8,15 @@
|
||||
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 \
|
||||
apt-transport-https \
|
||||
ca-certificates
|
||||
apt-transport-https \
|
||||
ca-certificates
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
JAVA_VERSION="21" setup_java
|
||||
@ -66,7 +66,7 @@ Restart=on-failure
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now zookeeper
|
||||
systemctl enable -q --now zookeeper
|
||||
msg_ok "Setup Zookeeper"
|
||||
|
||||
msg_info "Configuring ClickHouse"
|
||||
@ -104,8 +104,8 @@ fetch_and_deploy_gh_release "signoz-schema-migrator" "SigNoz/signoz-otel-collect
|
||||
|
||||
msg_info "Running ClickHouse migrations"
|
||||
cd /opt/signoz-schema-migrator/bin
|
||||
$STD ./signoz-schema-migrator sync --dsn="tcp://localhost:9000?password=" --replication=true --up=
|
||||
$STD ./signoz-schema-migrator async --dsn="tcp://localhost:9000?password=" --replication=true --up=
|
||||
$STD ./signoz-schema-migrator sync --dsn="tcp://localhost:9000?password=" --replication=true --up=
|
||||
$STD ./signoz-schema-migrator async --dsn="tcp://localhost:9000?password=" --replication=true --up=
|
||||
msg_ok "ClickHouse Migrations Completed"
|
||||
|
||||
fetch_and_deploy_gh_release "signoz" "SigNoz/signoz" "prebuild" "latest" "/opt/signoz" "signoz-community_linux_amd64.tar.gz"
|
||||
|
@ -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,18 +16,18 @@ update_os
|
||||
msg_info "Setting Up Hardware Acceleration"
|
||||
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
||||
if [[ "$CTTYPE" == "0" ]]; then
|
||||
chgrp video /dev/dri
|
||||
chmod 755 /dev/dri
|
||||
chmod 660 /dev/dri/*
|
||||
$STD adduser $(id -u -n) video
|
||||
$STD adduser $(id -u -n) render
|
||||
chgrp video /dev/dri
|
||||
chmod 755 /dev/dri
|
||||
chmod 660 /dev/dri/*
|
||||
$STD adduser $(id -u -n) video
|
||||
$STD adduser $(id -u -n) render
|
||||
fi
|
||||
msg_ok "Set Up Hardware Acceleration"
|
||||
|
||||
read -r -p "${TAB3}Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? <y/N> " prompt
|
||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Installing Intel Hardware Acceleration (non-free)"
|
||||
cat <<EOF >/etc/apt/sources.list.d/non-free.list
|
||||
msg_info "Installing Intel Hardware Acceleration (non-free)"
|
||||
cat <<EOF >/etc/apt/sources.list.d/non-free.list
|
||||
|
||||
deb http://deb.debian.org/debian bookworm non-free non-free-firmware
|
||||
deb-src http://deb.debian.org/debian bookworm non-free non-free-firmware
|
||||
@ -38,11 +38,11 @@ deb-src http://deb.debian.org/debian-security bookworm-security non-free non-fre
|
||||
deb http://deb.debian.org/debian bookworm-updates non-free non-free-firmware
|
||||
deb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware
|
||||
EOF
|
||||
$STD apt-get update
|
||||
$STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
||||
$STD apt-get update
|
||||
$STD apt-get -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
||||
else
|
||||
msg_info "Installing Intel Hardware Acceleration"
|
||||
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
||||
msg_info "Installing Intel Hardware Acceleration"
|
||||
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
||||
fi
|
||||
msg_ok "Installed and Set Up Intel Hardware Acceleration"
|
||||
|
||||
|
@ -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
|
||||
|
@ -8,19 +8,19 @@
|
||||
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 \
|
||||
python3-opencv jq \
|
||||
libgl1-mesa-glx libglib2.0-0 \
|
||||
libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 \
|
||||
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav \
|
||||
build-essential python3-dev python3-gi pkg-config libcairo2-dev gir1.2-glib-2.0 \
|
||||
cmake gfortran libopenblas-dev liblapack-dev libgirepository1.0-dev git
|
||||
python3-opencv jq \
|
||||
libgl1-mesa-glx libglib2.0-0 \
|
||||
libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 \
|
||||
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav \
|
||||
build-essential python3-dev python3-gi pkg-config libcairo2-dev gir1.2-glib-2.0 \
|
||||
cmake gfortran libopenblas-dev liblapack-dev libgirepository1.0-dev git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
@ -36,10 +36,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 "Hanko-Credentials"
|
||||
echo "Hanko Database User: $DB_USER"
|
||||
echo "Hanko Database Password: $DB_PASS"
|
||||
echo "Hanko Database Name: $DB_NAME"
|
||||
echo "Hanko-Credentials"
|
||||
echo "Hanko Database User: $DB_USER"
|
||||
echo "Hanko Database Password: $DB_PASS"
|
||||
echo "Hanko Database Name: $DB_NAME"
|
||||
} >>~/hanko.creds
|
||||
msg_ok "Set up PostgreSQL Database"
|
||||
|
||||
@ -61,16 +61,16 @@ msg_ok "Python Environment Setup"
|
||||
|
||||
msg_info "Setup Viseron (Patience)"
|
||||
if ls /dev/nvidia* >/dev/null 2>&1; then
|
||||
msg_info "GPU detected → Installing PyTorch with CUDA"
|
||||
UV_HTTP_TIMEOUT=600 uv pip install --python /opt/viseron/.venv/bin/python \
|
||||
torch==2.8.0 torchvision==0.19.0 torchaudio==2.8.0
|
||||
msg_ok "Installed Torch with CUDA"
|
||||
msg_info "GPU detected → Installing PyTorch with CUDA"
|
||||
UV_HTTP_TIMEOUT=600 uv pip install --python /opt/viseron/.venv/bin/python \
|
||||
torch==2.8.0 torchvision==0.19.0 torchaudio==2.8.0
|
||||
msg_ok "Installed Torch with CUDA"
|
||||
else
|
||||
msg_info "No GPU detected → Installing CPU-only PyTorch"
|
||||
UV_HTTP_TIMEOUT=600 uv pip install --python /opt/viseron/.venv/bin/python \
|
||||
torch==2.8.0+cpu torchvision==0.19.0+cpu torchaudio==2.8.0+cpu \
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||
msg_ok "Installed Torch CPU-only"
|
||||
msg_info "No GPU detected → Installing CPU-only PyTorch"
|
||||
UV_HTTP_TIMEOUT=600 uv pip install --python /opt/viseron/.venv/bin/python \
|
||||
torch==2.8.0+cpu torchvision==0.19.0+cpu torchaudio==2.8.0+cpu \
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||
msg_ok "Installed Torch CPU-only"
|
||||
fi
|
||||
UV_HTTP_TIMEOUT=600 uv pip install --python /opt/viseron/.venv/bin/python -e /opt/viseron/.
|
||||
UV_HTTP_TIMEOUT=600 uv pip install --python /opt/viseron/.venv/bin/python -r /opt/viseron/requirements.txt
|
||||
|
@ -7,17 +7,17 @@
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
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 \
|
||||
make \
|
||||
apache2 \
|
||||
libapache2-mod-php \
|
||||
redis
|
||||
make \
|
||||
apache2 \
|
||||
libapache2-mod-php \
|
||||
redis
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_mariadb
|
||||
@ -33,10 +33,10 @@ $STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "Wallabag Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
echo "Wallabag Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/wallabag.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
@ -48,12 +48,12 @@ useradd -d /opt/wallabag -s /bin/bash -M wallabag
|
||||
chown -R wallabag:wallabag /opt/wallabag
|
||||
mv /opt/wallabag/app/config/parameters.yml.dist /opt/wallabag/app/config/parameters.yml
|
||||
sed -i \
|
||||
-e 's|database_name: wallabag|database_name: wallabag_db|' \
|
||||
-e 's|database_port: ~|database_port: 3306|' \
|
||||
-e 's|database_user: root|database_user: wallabag|' \
|
||||
-e 's|database_password: ~|database_password: '"$DB_PASS"'|' \
|
||||
-e 's|secret: .*|secret: '"$SECRET_KEY"'|' \
|
||||
/opt/wallabag/app/config/parameters.yml
|
||||
-e 's|database_name: wallabag|database_name: wallabag_db|' \
|
||||
-e 's|database_port: ~|database_port: 3306|' \
|
||||
-e 's|database_user: root|database_user: wallabag|' \
|
||||
-e 's|database_password: ~|database_password: '"$DB_PASS"'|' \
|
||||
-e 's|secret: .*|secret: '"$SECRET_KEY"'|' \
|
||||
/opt/wallabag/app/config/parameters.yml
|
||||
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
sudo -u wallabag make install --no-interaction
|
||||
|
Loading…
x
Reference in New Issue
Block a user