test
This commit is contained in:
parent
3f69160fb9
commit
eed916b6cc
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -46,7 +46,7 @@ msg_ok "Setup Garage packages"
|
|||||||
|
|
||||||
msg_info "Writing config"
|
msg_info "Writing config"
|
||||||
if [[ ! -f /etc/garage.toml ]]; then
|
if [[ ! -f /etc/garage.toml ]]; then
|
||||||
cat >/etc/garage.toml <<EOF
|
cat >/etc/garage.toml <<EOF
|
||||||
replication_factor = 1
|
replication_factor = 1
|
||||||
consistency_mode = "consistent"
|
consistency_mode = "consistent"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -8,69 +8,69 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
git \
|
git \
|
||||||
libnewt-dev \
|
libnewt-dev \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
libncurses5-dev \
|
libncurses5-dev \
|
||||||
subversion \
|
subversion \
|
||||||
libsqlite3-dev \
|
libsqlite3-dev \
|
||||||
libjansson-dev \
|
libjansson-dev \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
uuid-dev \
|
uuid-dev \
|
||||||
default-libmysqlclient-dev \
|
default-libmysqlclient-dev \
|
||||||
htop \
|
htop \
|
||||||
sngrep \
|
sngrep \
|
||||||
lame \
|
lame \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
mpg123 \
|
mpg123 \
|
||||||
vim \
|
vim \
|
||||||
expect \
|
expect \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
apache2 \
|
apache2 \
|
||||||
mariadb-server \
|
mariadb-server \
|
||||||
mariadb-client \
|
mariadb-client \
|
||||||
bison \
|
bison \
|
||||||
flex \
|
flex \
|
||||||
php8.2 \
|
php8.2 \
|
||||||
php8.2-{curl,cli,common,mysql,gd,mbstring,intl,xml} \
|
php8.2-{curl,cli,common,mysql,gd,mbstring,intl,xml} \
|
||||||
php-pear \
|
php-pear \
|
||||||
sox \
|
sox \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
automake \
|
automake \
|
||||||
libtool \
|
libtool \
|
||||||
autoconf \
|
autoconf \
|
||||||
unixodbc-dev \
|
unixodbc-dev \
|
||||||
uuid \
|
uuid \
|
||||||
libasound2-dev \
|
libasound2-dev \
|
||||||
libogg-dev \
|
libogg-dev \
|
||||||
libvorbis-dev \
|
libvorbis-dev \
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
odbc-mariadb \
|
odbc-mariadb \
|
||||||
libical-dev \
|
libical-dev \
|
||||||
libneon27-dev \
|
libneon27-dev \
|
||||||
libsrtp2-dev \
|
libsrtp2-dev \
|
||||||
libspandsp-dev \
|
libspandsp-dev \
|
||||||
subversion \
|
subversion \
|
||||||
libtool-bin \
|
libtool-bin \
|
||||||
python-dev-is-python3 \
|
python-dev-is-python3 \
|
||||||
unixodbc \
|
unixodbc \
|
||||||
software-properties-common \
|
software-properties-common \
|
||||||
nodejs \
|
nodejs \
|
||||||
npm \
|
npm \
|
||||||
ipset \
|
ipset \
|
||||||
iptables \
|
iptables \
|
||||||
fail2ban \
|
fail2ban \
|
||||||
php-soap
|
php-soap
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Asterisk (Patience)"
|
msg_info "Installing Asterisk (Patience)"
|
||||||
|
@ -5,46 +5,46 @@
|
|||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Python3"
|
msg_info "Installing Python3"
|
||||||
$STD apt-get install -y --no-install-recommends \
|
$STD apt-get install -y --no-install-recommends \
|
||||||
python3 \
|
python3 \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
python3-venv
|
python3-venv
|
||||||
msg_ok "Installed Python3"
|
msg_ok "Installed Python3"
|
||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
msg_info "Installing Dependencies (Patience)"
|
||||||
$STD apt-get install -y --no-install-recommends \
|
$STD apt-get install -y --no-install-recommends \
|
||||||
redis \
|
redis \
|
||||||
postgresql \
|
postgresql \
|
||||||
postgresql-contrib \
|
postgresql-contrib \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
build-essential \
|
build-essential \
|
||||||
gnupg \
|
gnupg \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
libjpeg-dev \
|
libjpeg-dev \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
libmagic-dev \
|
libmagic-dev \
|
||||||
libzbar0 \
|
libzbar0 \
|
||||||
poppler-utils \
|
poppler-utils \
|
||||||
automake \
|
automake \
|
||||||
libtool \
|
libtool \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
curl \
|
curl \
|
||||||
libtiff-dev \
|
libtiff-dev \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libleptonica-dev \
|
libleptonica-dev \
|
||||||
sudo \
|
sudo \
|
||||||
make \
|
make \
|
||||||
mc
|
mc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setup Funkwhale Dependencies (Patience)"
|
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"
|
$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')
|
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/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
|
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
|
# 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
|
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)"
|
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 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 "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 "" >>~/funkwhale.creds
|
||||||
echo -e "Funkwhale Database User: \e[32m$DB_USER\e[0m" >>~/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
|
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
|
read -r -p "Would you like to Setup Reverse Proxy (Nginx)? <y/N> " prompt
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Installing NGINX"
|
msg_info "Installing NGINX"
|
||||||
$STD apt install -y nginx
|
$STD apt install -y nginx
|
||||||
sudo su
|
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/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 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}'`" \
|
$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.template \
|
||||||
> /etc/nginx/sites-available/funkwhale.conf
|
>/etc/nginx/sites-available/funkwhale.conf
|
||||||
$STD grep '${' /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 ln -s /etc/nginx/sites-available/funkwhale.conf /etc/nginx/sites-enabled/
|
||||||
$STD systemctl reload nginx
|
$STD systemctl reload nginx
|
||||||
msg_ok "Installed Nginx"
|
msg_ok "Installed Nginx"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -r -p "Would you like to Setup TLS (Certbot)? <y/N> " prompt
|
read -r -p "Would you like to Setup TLS (Certbot)? <y/N> " prompt
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Installing Certbot"
|
msg_info "Installing Certbot"
|
||||||
$STD apt install -y certbot python3-certbot-nginx
|
$STD apt install -y certbot python3-certbot-nginx
|
||||||
$STD sudo certbot --nginx -d $FUNKWHALE_HOSTNAME
|
$STD sudo certbot --nginx -d $FUNKWHALE_HOSTNAME
|
||||||
msg_ok "Installed Certbot"
|
msg_ok "Installed Certbot"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -71,7 +71,7 @@ REDIS_PORT=6379
|
|||||||
REDIS_PASSWORD="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
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 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
|
$STD systemctl restart redis
|
||||||
echo "" >>~/ghostfolio.creds
|
echo "" >>~/ghostfolio.creds
|
||||||
echo "Ghostfolio Redis Credentials" >>~/ghostfolio.creds
|
echo "Ghostfolio Redis Credentials" >>~/ghostfolio.creds
|
||||||
@ -176,4 +176,4 @@ customize
|
|||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
@ -9,25 +9,25 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
msg_info "Installing Dependencies (Patience)"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
libc6-dev \
|
libc6-dev \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
clang \
|
clang \
|
||||||
llvm \
|
llvm \
|
||||||
nettle-dev \
|
nettle-dev \
|
||||||
build-essential \
|
build-essential \
|
||||||
curl \
|
curl \
|
||||||
sudo \
|
sudo \
|
||||||
make \
|
make \
|
||||||
mc
|
mc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Rust (Patience)"
|
msg_info "Installing Rust (Patience)"
|
||||||
|
@ -8,14 +8,14 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
iptables
|
iptables
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing JumpServer"
|
msg_info "Installing JumpServer"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
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 curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/netbootxyz/netboot.xyz/archive/${RELEASE}.tar.gz"
|
||||||
$STD tar xvzf ${RELEASE}.tar.gz
|
$STD tar xvzf ${RELEASE}.tar.gz
|
||||||
VER=$(curl -s https://api.github.com/repos/netbootxyz/netboot.xyz/releases/latest |
|
VER=$(curl -s https://api.github.com/repos/netbootxyz/netboot.xyz/releases/latest |
|
||||||
grep "tag_name" |
|
grep "tag_name" |
|
||||||
awk '{print substr($2, 2, length($2)-3) }')
|
awk '{print substr($2, 2, length($2)-3) }')
|
||||||
rm -rf ${RELEASE}.tar.gz
|
rm -rf ${RELEASE}.tar.gz
|
||||||
mv netboot.xyz-${VER} /opt/netboot.xyz
|
mv netboot.xyz-${VER} /opt/netboot.xyz
|
||||||
msg_ok "Installed netboot.xyz ${RELEASE}"
|
msg_ok "Installed netboot.xyz ${RELEASE}"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -16,29 +16,29 @@ update_os
|
|||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get -y install \
|
$STD apt-get -y install \
|
||||||
sudo \
|
sudo \
|
||||||
mc \
|
mc \
|
||||||
curl \
|
curl \
|
||||||
gnupg \
|
gnupg \
|
||||||
make \
|
make \
|
||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
apache2-utils \
|
apache2-utils \
|
||||||
logrotate \
|
logrotate \
|
||||||
build-essential \
|
build-essential \
|
||||||
git
|
git
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Python3"
|
msg_info "Installing Python3"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
python3 \
|
python3 \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-venv \
|
python3-venv \
|
||||||
python3-cffi \
|
python3-cffi \
|
||||||
python3-certbot \
|
python3-certbot \
|
||||||
python3-certbot-dns-cloudflare
|
python3-certbot-dns-cloudflare
|
||||||
$STD pip3 install certbot-dns-multi
|
$STD pip3 install certbot-dns-multi
|
||||||
$STD python3 -m venv /opt/certbot/
|
$STD python3 -m venv /opt/certbot/
|
||||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
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
|
sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf
|
||||||
NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf")
|
NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf")
|
||||||
for NGINX_CONF in $NGINX_CONFS; do
|
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
|
done
|
||||||
|
|
||||||
mkdir -p /var/www/html /etc/nginx/logs
|
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
|
rm -f /etc/nginx/conf.d/dev.conf
|
||||||
|
|
||||||
mkdir -p /tmp/nginx/body \
|
mkdir -p /tmp/nginx/body \
|
||||||
/run/nginx \
|
/run/nginx \
|
||||||
/data/nginx \
|
/data/nginx \
|
||||||
/data/custom_ssl \
|
/data/custom_ssl \
|
||||||
/data/logs \
|
/data/logs \
|
||||||
/data/access \
|
/data/access \
|
||||||
/data/nginx/default_host \
|
/data/nginx/default_host \
|
||||||
/data/nginx/default_www \
|
/data/nginx/default_www \
|
||||||
/data/nginx/proxy_host \
|
/data/nginx/proxy_host \
|
||||||
/data/nginx/redirection_host \
|
/data/nginx/redirection_host \
|
||||||
/data/nginx/stream \
|
/data/nginx/stream \
|
||||||
/data/nginx/dead_host \
|
/data/nginx/dead_host \
|
||||||
/data/nginx/temp \
|
/data/nginx/temp \
|
||||||
/var/lib/nginx/cache/public \
|
/var/lib/nginx/cache/public \
|
||||||
/var/lib/nginx/cache/private \
|
/var/lib/nginx/cache/private \
|
||||||
/var/cache/nginx/proxy_temp
|
/var/cache/nginx/proxy_temp
|
||||||
|
|
||||||
chmod -R 777 /var/cache/nginx
|
chmod -R 777 /var/cache/nginx
|
||||||
chown root /tmp/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
|
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
|
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
|
fi
|
||||||
|
|
||||||
mkdir -p /app/global /app/frontend/images
|
mkdir -p /app/global /app/frontend/images
|
||||||
@ -130,7 +130,7 @@ msg_ok "Built Frontend"
|
|||||||
msg_info "Initializing Backend"
|
msg_info "Initializing Backend"
|
||||||
rm -rf /app/config/default.json
|
rm -rf /app/config/default.json
|
||||||
if [ ! -f /app/config/production.json ]; then
|
if [ ! -f /app/config/production.json ]; then
|
||||||
cat <<'EOF' >/app/config/production.json
|
cat <<'EOF' >/app/config/production.json
|
||||||
{
|
{
|
||||||
"database": {
|
"database": {
|
||||||
"engine": "knex-native",
|
"engine": "knex-native",
|
||||||
|
@ -8,16 +8,16 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
msg_info "Installing dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
openssl \
|
openssl \
|
||||||
git
|
git
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Bun"
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||||
{
|
{
|
||||||
echo "Nimbus-Credentials"
|
echo "Nimbus-Credentials"
|
||||||
echo "Nimbus Database User: $DB_USER"
|
echo "Nimbus Database User: $DB_USER"
|
||||||
echo "Nimbus Database Password: $DB_PASS"
|
echo "Nimbus Database Password: $DB_PASS"
|
||||||
echo "Nimbus Database Name: $DB_NAME"
|
echo "Nimbus Database Name: $DB_NAME"
|
||||||
} >>~/nimbus.creds
|
} >>~/nimbus.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
msg_ok "Set up PostgreSQL Database"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -8,20 +8,20 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
make \
|
make \
|
||||||
git \
|
git \
|
||||||
build-essential \
|
build-essential \
|
||||||
binutils \
|
binutils \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
libsqlite3-dev \
|
libsqlite3-dev \
|
||||||
libssl-dev
|
libssl-dev
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Rust"
|
msg_info "Installing Rust"
|
||||||
|
@ -7,24 +7,24 @@
|
|||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
# Source: https://github.com/roundcube/roundcubemail
|
# Source: https://github.com/roundcube/roundcubemail
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
curl \
|
curl \
|
||||||
sudo \
|
sudo \
|
||||||
mc \
|
mc \
|
||||||
postgresql \
|
postgresql \
|
||||||
apache2 \
|
apache2 \
|
||||||
libapache2-mod-php \
|
libapache2-mod-php \
|
||||||
composer \
|
composer \
|
||||||
php8.2-{mbstring,gd,imap,mysql,ldap,curl,intl,imagick,bz2,sqlite3,zip,xml}
|
php8.2-{mbstring,gd,imap,mysql,ldap,curl,intl,imagick,bz2,sqlite3,zip,xml}
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL"
|
msg_info "Setting up PostgreSQL"
|
||||||
@ -74,7 +74,7 @@ $STD sudo a2enmod deflate
|
|||||||
$STD sudo a2enmod expires
|
$STD sudo a2enmod expires
|
||||||
$STD sudo a2enmod headers
|
$STD sudo a2enmod headers
|
||||||
$STD a2ensite roundcubemail.conf
|
$STD a2ensite roundcubemail.conf
|
||||||
$STD a2dissite 000-default.conf
|
$STD a2dissite 000-default.conf
|
||||||
$STD systemctl reload apache2
|
$STD systemctl reload apache2
|
||||||
msg_ok "Installed Wallos"
|
msg_ok "Installed Wallos"
|
||||||
|
|
||||||
@ -85,4 +85,4 @@ msg_info "Cleaning up"
|
|||||||
rm -rf /opt/roundcubemail-${RELEASE}-complete.tar.gz
|
rm -rf /opt/roundcubemail-${RELEASE}-complete.tar.gz
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -16,7 +16,7 @@ update_os
|
|||||||
# Generate a random string
|
# Generate a random string
|
||||||
generate_random_string() {
|
generate_random_string() {
|
||||||
local LENGTH=$1
|
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"
|
msg_info "Installing Dependencies"
|
||||||
@ -46,7 +46,7 @@ msg_ok "Installed Redis"
|
|||||||
msg_info "Installing Nginx"
|
msg_info "Installing Nginx"
|
||||||
$STD apk add nginx
|
$STD apk add nginx
|
||||||
rm -rf /etc/nginx/http.d/default.conf
|
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 {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
@ -90,8 +90,8 @@ msg_ok "Installed Nginx"
|
|||||||
msg_info "Installing MongoDB Database"
|
msg_info "Installing MongoDB Database"
|
||||||
DB_NAME=ssm
|
DB_NAME=ssm
|
||||||
DB_PORT=27017
|
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/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/community' >>/etc/apk/repositories
|
||||||
$STD apk update
|
$STD apk update
|
||||||
$STD apk add mongodb mongodb-tools
|
$STD apk add mongodb mongodb-tools
|
||||||
msg_ok "Installed MongoDB Database"
|
msg_ok "Installed MongoDB Database"
|
||||||
@ -108,7 +108,7 @@ $STD git clone https://github.com/SquirrelCorporation/SquirrelServersManager.git
|
|||||||
SECRET=$(generate_random_string 32)
|
SECRET=$(generate_random_string 32)
|
||||||
SALT=$(generate_random_string 16)
|
SALT=$(generate_random_string 16)
|
||||||
VAULT_PWD=$(generate_random_string 32)
|
VAULT_PWD=$(generate_random_string 32)
|
||||||
cat <<EOF > /opt/squirrelserversmanager/.env
|
cat <<EOF >/opt/squirrelserversmanager/.env
|
||||||
# SECRETS
|
# SECRETS
|
||||||
SECRET=$SECRET
|
SECRET=$SECRET
|
||||||
SALT=$SALT
|
SALT=$SALT
|
||||||
|
@ -4,22 +4,22 @@
|
|||||||
# Author: MickLesk (CanbiZ)
|
# Author: MickLesk (CanbiZ)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
curl \
|
curl \
|
||||||
sudo \
|
sudo \
|
||||||
mc \
|
mc \
|
||||||
gnupg \
|
gnupg \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
lsb-release
|
lsb-release
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL Repository"
|
msg_info "Setting up PostgreSQL Repository"
|
||||||
@ -60,10 +60,10 @@ cat <<EOF >/etc/postgresql/17/main/postgresql.conf
|
|||||||
# FILE LOCATIONS
|
# FILE LOCATIONS
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
data_directory = '/var/lib/postgresql/17/main'
|
data_directory = '/var/lib/postgresql/17/main'
|
||||||
hba_file = '/etc/postgresql/17/main/pg_hba.conf'
|
hba_file = '/etc/postgresql/17/main/pg_hba.conf'
|
||||||
ident_file = '/etc/postgresql/17/main/pg_ident.conf'
|
ident_file = '/etc/postgresql/17/main/pg_ident.conf'
|
||||||
external_pid_file = '/var/run/postgresql/17-main.pid'
|
external_pid_file = '/var/run/postgresql/17-main.pid'
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# CONNECTIONS AND AUTHENTICATION
|
# CONNECTIONS AND AUTHENTICATION
|
||||||
@ -71,10 +71,10 @@ external_pid_file = '/var/run/postgresql/17-main.pid'
|
|||||||
|
|
||||||
# - Connection Settings -
|
# - Connection Settings -
|
||||||
|
|
||||||
listen_addresses = '*'
|
listen_addresses = '*'
|
||||||
port = 5432
|
port = 5432
|
||||||
max_connections = 100
|
max_connections = 100
|
||||||
unix_socket_directories = '/var/run/postgresql'
|
unix_socket_directories = '/var/run/postgresql'
|
||||||
|
|
||||||
# - SSL -
|
# - SSL -
|
||||||
|
|
||||||
@ -86,8 +86,8 @@ ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
|
|||||||
# RESOURCE USAGE (except WAL)
|
# RESOURCE USAGE (except WAL)
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
shared_buffers = 128MB
|
shared_buffers = 128MB
|
||||||
dynamic_shared_memory_type = posix
|
dynamic_shared_memory_type = posix
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# WRITE-AHEAD LOG
|
# WRITE-AHEAD LOG
|
||||||
@ -102,14 +102,14 @@ min_wal_size = 80MB
|
|||||||
|
|
||||||
# - What to Log -
|
# - What to Log -
|
||||||
|
|
||||||
log_line_prefix = '%m [%p] %q%u@%d '
|
log_line_prefix = '%m [%p] %q%u@%d '
|
||||||
log_timezone = 'Etc/UTC'
|
log_timezone = 'Etc/UTC'
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# PROCESS TITLE
|
# PROCESS TITLE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
cluster_name = '17/main'
|
cluster_name = '17/main'
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# CLIENT CONNECTION DEFAULTS
|
# CLIENT CONNECTION DEFAULTS
|
||||||
@ -119,23 +119,22 @@ cluster_name = '17/main'
|
|||||||
|
|
||||||
datestyle = 'iso, mdy'
|
datestyle = 'iso, mdy'
|
||||||
timezone = 'Etc/UTC'
|
timezone = 'Etc/UTC'
|
||||||
lc_messages = 'C'
|
lc_messages = 'C'
|
||||||
lc_monetary = 'C'
|
lc_monetary = 'C'
|
||||||
lc_numeric = 'C'
|
lc_numeric = 'C'
|
||||||
lc_time = 'C'
|
lc_time = 'C'
|
||||||
default_text_search_config = 'pg_catalog.english'
|
default_text_search_config = 'pg_catalog.english'
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# CONFIG FILE INCLUDES
|
# CONFIG FILE INCLUDES
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
include_dir = 'conf.d'
|
include_dir = 'conf.d'
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
systemctl restart postgresql
|
systemctl restart postgresql
|
||||||
msg_ok "Installed PostgreSQL"
|
msg_ok "Installed PostgreSQL"
|
||||||
|
|
||||||
|
|
||||||
msg_info "Setup TimescaleDB"
|
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
|
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
|
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
|
read -r -p "Would you like to add Adminer? <y/N> " prompt
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Installing Adminer"
|
msg_info "Installing Adminer"
|
||||||
$STD apt install -y adminer
|
$STD apt install -y adminer
|
||||||
$STD a2enconf adminer
|
$STD a2enconf adminer
|
||||||
systemctl reload apache2
|
systemctl reload apache2
|
||||||
msg_ok "Installed Adminer"
|
msg_ok "Installed Adminer"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -20,15 +20,15 @@ update_os
|
|||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
gcc \
|
gcc \
|
||||||
libpcre3-dev \
|
libpcre3-dev \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
nginx \
|
nginx \
|
||||||
redis-server \
|
redis-server \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
procps \
|
procps \
|
||||||
streamlink
|
streamlink
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PYTHON_VERSION="3.13" setup_uv
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
||||||
{
|
{
|
||||||
echo "Dispatcharr-Credentials"
|
echo "Dispatcharr-Credentials"
|
||||||
echo "Dispatcharr Database Name: $DB_NAME"
|
echo "Dispatcharr Database Name: $DB_NAME"
|
||||||
echo "Dispatcharr Database User: $DB_USER"
|
echo "Dispatcharr Database User: $DB_USER"
|
||||||
echo "Dispatcharr Database Password: $DB_PASS"
|
echo "Dispatcharr Database Password: $DB_PASS"
|
||||||
} >>~/dispatcharr.creds
|
} >>~/dispatcharr.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
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)
|
UV_INDEX_ARGS=(--index-url "$PYPI_URL" --index-strategy unsafe-best-match)
|
||||||
for u in "${EXTRA_INDEX_URLS[@]}"; do
|
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
|
done
|
||||||
if [[ -f requirements.txt ]]; then
|
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
|
fi
|
||||||
$STD uv pip install --system "${UV_INDEX_ARGS[@]}" gunicorn gevent celery daphne
|
$STD uv pip install --system "${UV_INDEX_ARGS[@]}" gunicorn gevent celery daphne
|
||||||
ln -sf /usr/bin/ffmpeg /opt/dispatcharr/env/bin/ffmpeg
|
ln -sf /usr/bin/ffmpeg /opt/dispatcharr/env/bin/ffmpeg
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -23,15 +23,14 @@ $STD apt-get install -y \
|
|||||||
ca-certificates \
|
ca-certificates \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
tesseract-ocr
|
tesseract-ocr
|
||||||
#tesseract-ocr-deu \
|
#tesseract-ocr-deu \
|
||||||
#tesseract-ocr-eng \
|
#tesseract-ocr-eng \
|
||||||
#unpaper \
|
#unpaper \
|
||||||
#unoconv \
|
#unoconv \
|
||||||
#wkhtmltopdf \
|
#wkhtmltopdf \
|
||||||
#ocrmypdf
|
#ocrmypdf
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
|
||||||
setup_gs
|
setup_gs
|
||||||
JAVA_VERSION="21" setup_java
|
JAVA_VERSION="21" setup_java
|
||||||
POSTGRES_VERSION="16" setup_postgresql
|
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
|
} >>~/docspell.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
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-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-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 "docspell-dsc" "docspell/dsc" "singlefile" "latest" "/usr/bin" "dsc"
|
||||||
fetch_and_deploy_gh_release "apache-solr" "apache/solr" "tarball" "latest" "/opt/docspell"
|
fetch_and_deploy_gh_release "apache-solr" "apache/solr" "tarball" "latest" "/opt/docspell"
|
||||||
|
|
||||||
|
|
||||||
msg_info "Setup 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
|
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 \
|
sed -i \
|
||||||
|
@ -8,18 +8,18 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
libsodium23 \
|
libsodium23 \
|
||||||
libsodium-dev \
|
libsodium-dev \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
caddy \
|
caddy \
|
||||||
gcc
|
gcc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="17" setup_postgresql
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
||||||
{
|
{
|
||||||
echo "Ente Credentials"
|
echo "Ente Credentials"
|
||||||
echo "Database Name: $DB_NAME"
|
echo "Database Name: $DB_NAME"
|
||||||
echo "Database User: $DB_USER"
|
echo "Database User: $DB_USER"
|
||||||
echo "Database Password: $DB_PASS"
|
echo "Database Password: $DB_PASS"
|
||||||
} >>~/ente.creds
|
} >>~/ente.creds
|
||||||
msg_ok "Set up PostgreSQL"
|
msg_ok "Set up PostgreSQL"
|
||||||
|
|
||||||
@ -52,10 +52,10 @@ export CGO_ENABLED=1
|
|||||||
CGO_CFLAGS="$(pkg-config --cflags libsodium || true)"
|
CGO_CFLAGS="$(pkg-config --cflags libsodium || true)"
|
||||||
CGO_LDFLAGS="$(pkg-config --libs libsodium || true)"
|
CGO_LDFLAGS="$(pkg-config --libs libsodium || true)"
|
||||||
if [ -z "$CGO_CFLAGS" ]; then
|
if [ -z "$CGO_CFLAGS" ]; then
|
||||||
CGO_CFLAGS="-I/usr/include"
|
CGO_CFLAGS="-I/usr/include"
|
||||||
fi
|
fi
|
||||||
if [ -z "$CGO_LDFLAGS" ]; then
|
if [ -z "$CGO_LDFLAGS" ]; then
|
||||||
CGO_LDFLAGS="-lsodium"
|
CGO_LDFLAGS="-lsodium"
|
||||||
fi
|
fi
|
||||||
export CGO_CFLAGS
|
export CGO_CFLAGS
|
||||||
export CGO_LDFLAGS
|
export CGO_LDFLAGS
|
||||||
|
@ -12,7 +12,7 @@ INSTALL_PATH="/opt/sng_freepbx_debian_install.sh"
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -24,80 +24,80 @@ msg_ok "Remove Firewall module is set to: $REMOVE_FIREWALL"
|
|||||||
|
|
||||||
msg_info "Downloading FreePBX installation script..."
|
msg_info "Downloading FreePBX installation script..."
|
||||||
if curl -fsSL "$INSTALL_URL" -o "$INSTALL_PATH"; then
|
if curl -fsSL "$INSTALL_URL" -o "$INSTALL_PATH"; then
|
||||||
msg_ok "Download completed successfully"
|
msg_ok "Download completed successfully"
|
||||||
else
|
else
|
||||||
curl_exit_code=$?
|
curl_exit_code=$?
|
||||||
msg_error "Error downloading FreePBX installation script (curl exit code: $curl_exit_code)"
|
msg_error "Error downloading FreePBX installation script (curl exit code: $curl_exit_code)"
|
||||||
msg_error "Aborting!"
|
msg_error "Aborting!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$VERBOSE" == "yes" ]]; then
|
if [[ "$VERBOSE" == "yes" ]]; then
|
||||||
msg_info "Installing FreePBX (Verbose)\n"
|
msg_info "Installing FreePBX (Verbose)\n"
|
||||||
else
|
else
|
||||||
msg_info "Installing FreePBX, be patient, this takes time..."
|
msg_info "Installing FreePBX, be patient, this takes time..."
|
||||||
fi
|
fi
|
||||||
$STD bash "$INSTALL_PATH"
|
$STD bash "$INSTALL_PATH"
|
||||||
|
|
||||||
if [[ $ONLY_OPENSOURCE == "yes" ]]; then
|
if [[ $ONLY_OPENSOURCE == "yes" ]]; then
|
||||||
msg_info "Removing Commercial modules..."
|
msg_info "Removing Commercial modules..."
|
||||||
|
|
||||||
end_count=0
|
end_count=0
|
||||||
max=5
|
max=5
|
||||||
count=0
|
count=0
|
||||||
while fwconsole ma list | awk '/Commercial/ {found=1} END {exit !found}'; do
|
while fwconsole ma list | awk '/Commercial/ {found=1} END {exit !found}'; do
|
||||||
count=$((count + 1))
|
count=$((count + 1))
|
||||||
while read -r module; do
|
while read -r module; do
|
||||||
msg_info "Removing module: $module"
|
msg_info "Removing module: $module"
|
||||||
|
|
||||||
if [[ "$REMOVE_FIREWALL" == "no" ]] && [[ "$module" == "sysadmin" ]]; then
|
if [[ "$REMOVE_FIREWALL" == "no" ]] && [[ "$module" == "sysadmin" ]]; then
|
||||||
msg_warn "Skipping sysadmin module removal, it is required for Firewall!"
|
msg_warn "Skipping sysadmin module removal, it is required for Firewall!"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
code=0
|
code=0
|
||||||
$STD fwconsole ma -f remove $module || code=$?
|
$STD fwconsole ma -f remove $module || code=$?
|
||||||
if [[ $code -ne 0 ]]; then
|
if [[ $code -ne 0 ]]; then
|
||||||
msg_error "Module $module could not be removed - error code $code"
|
msg_error "Module $module could not be removed - error code $code"
|
||||||
else
|
else
|
||||||
msg_ok "Module $module removed successfully"
|
msg_ok "Module $module removed successfully"
|
||||||
fi
|
fi
|
||||||
done < <(fwconsole ma list | awk '/Commercial/ {print $2}')
|
done < <(fwconsole ma list | awk '/Commercial/ {print $2}')
|
||||||
|
|
||||||
[[ $count -ge $max ]] && break
|
[[ $count -ge $max ]] && break
|
||||||
|
|
||||||
com_list=$(fwconsole ma list)
|
com_list=$(fwconsole ma list)
|
||||||
end_count=$(awk '/Commercial/ {count++} END {print count + 0}' <<< "$com_list")
|
end_count=$(awk '/Commercial/ {count++} END {print count + 0}' <<<"$com_list")
|
||||||
awk '/Commercial/ {found=1} END {exit !found}' <<< "$com_list" || break
|
awk '/Commercial/ {found=1} END {exit !found}' <<<"$com_list" || break
|
||||||
if [[ "$REMOVE_FIREWALL" == "no" ]] && \
|
if [[ "$REMOVE_FIREWALL" == "no" ]] &&
|
||||||
[[ $end_count -eq 1 ]] && \
|
[[ $end_count -eq 1 ]] &&
|
||||||
[[ $(awk '/Commercial/ {print $2}' <<< "$com_list") == "sysadmin" ]]; then
|
[[ $(awk '/Commercial/ {print $2}' <<<"$com_list") == "sysadmin" ]]; then
|
||||||
break
|
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
|
fi
|
||||||
|
|
||||||
msg_warn "Not all commercial modules could be removed, retrying (attempt $count of $max)..."
|
if [[ $end_count -eq 0 ]]; then
|
||||||
done
|
msg_ok "All commercial modules removed successfully"
|
||||||
|
elif [[ $end_count -eq 1 ]] && [[ $REMOVE_FIREWALL == "no" ]] && [[ $(fwconsole ma list | awk '/Commercial/ {print $2}') == "sysadmin" ]]; then
|
||||||
if [[ $REMOVE_FIREWALL == "yes" ]] && [[ $end_count -gt 0 ]]; then
|
msg_ok "Only sysadmin module left, which is required for Firewall, skipping removal"
|
||||||
msg_info "Removing Firewall module..."
|
|
||||||
if $STD fwconsole ma -f remove firewall; then
|
|
||||||
msg_ok "Firewall module removed successfully"
|
|
||||||
else
|
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
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $end_count -eq 0 ]]; then
|
msg_info "Reloading FreePBX..."
|
||||||
msg_ok "All commercial modules removed successfully"
|
$STD fwconsole reload
|
||||||
elif [[ $end_count -eq 1 ]] && [[ $REMOVE_FIREWALL == "no" ]] && [[ $(fwconsole ma list | awk '/Commercial/ {print $2}') == "sysadmin" ]]; then
|
msg_ok "FreePBX reloaded completely"
|
||||||
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"
|
|
||||||
fi
|
fi
|
||||||
msg_ok "Installed FreePBX finished"
|
msg_ok "Installed FreePBX finished"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -84,9 +84,9 @@ EOF
|
|||||||
mkdir -p /config
|
mkdir -p /config
|
||||||
ln -sf /config/config.yml /opt/frigate/config/config.yml
|
ln -sf /config/config.yml /opt/frigate/config/config.yml
|
||||||
if [[ "$CTTYPE" == "0" ]]; then
|
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
|
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
|
fi
|
||||||
echo "tmpfs /tmp/cache tmpfs defaults 0 0" >>/etc/fstab
|
echo "tmpfs /tmp/cache tmpfs defaults 0 0" >>/etc/fstab
|
||||||
mkdir -p /media/frigate
|
mkdir -p /media/frigate
|
||||||
@ -97,18 +97,18 @@ EOF
|
|||||||
msg_ok "Config ready"
|
msg_ok "Config ready"
|
||||||
|
|
||||||
if grep -q -o -m1 -E 'avx[^ ]*' /proc/cpuinfo; then
|
if grep -q -o -m1 -E 'avx[^ ]*' /proc/cpuinfo; then
|
||||||
msg_ok "AVX Support Detected"
|
msg_ok "AVX Support Detected"
|
||||||
msg_info "Installing Openvino Object Detection Model (Resilience)"
|
msg_info "Installing Openvino Object Detection Model (Resilience)"
|
||||||
$STD pip install -r /opt/frigate/docker/main/requirements-ov.txt
|
$STD pip install -r /opt/frigate/docker/main/requirements-ov.txt
|
||||||
cd /opt/frigate/models
|
cd /opt/frigate/models
|
||||||
export ENABLE_ANALYTICS=NO
|
export ENABLE_ANALYTICS=NO
|
||||||
$STD /usr/local/bin/omz_downloader --name ssdlite_mobilenet_v2 --num_attempts 2
|
$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
|
$STD /usr/local/bin/omz_converter --name ssdlite_mobilenet_v2 --precision FP16 --mo /usr/local/bin/mo
|
||||||
cd /
|
cd /
|
||||||
cp -r /opt/frigate/models/public/ssdlite_mobilenet_v2 openvino-model
|
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"
|
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
|
sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt
|
||||||
cat <<EOF >>/config/config.yml
|
cat <<EOF >>/config/config.yml
|
||||||
detectors:
|
detectors:
|
||||||
ov:
|
ov:
|
||||||
type: openvino
|
type: openvino
|
||||||
@ -122,9 +122,9 @@ model:
|
|||||||
input_pixel_format: bgr
|
input_pixel_format: bgr
|
||||||
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
|
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Installed Openvino Object Detection Model"
|
msg_ok "Installed Openvino Object Detection Model"
|
||||||
else
|
else
|
||||||
cat <<EOF >>/config/config.yml
|
cat <<EOF >>/config/config.yml
|
||||||
model:
|
model:
|
||||||
path: /cpu_model.tflite
|
path: /cpu_model.tflite
|
||||||
EOF
|
EOF
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -77,9 +77,9 @@ $STD grafana-cli plugins install marcusolsson-hourly-heatmap-panel
|
|||||||
$STD systemctl restart grafana-server
|
$STD systemctl restart grafana-server
|
||||||
# Output credentials to file
|
# Output credentials to file
|
||||||
{
|
{
|
||||||
echo "Grafana Credentials"
|
echo "Grafana Credentials"
|
||||||
echo "Grafana User: ${GRAFANA_USER}"
|
echo "Grafana User: ${GRAFANA_USER}"
|
||||||
echo "Grafana Password: ${GRAFANA_PASS}"
|
echo "Grafana Password: ${GRAFANA_PASS}"
|
||||||
} >>~/garmin-grafana.creds
|
} >>~/garmin-grafana.creds
|
||||||
msg_ok "Set up Grafana"
|
msg_ok "Set up Grafana"
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ curl -fsSL -o "${RELEASE}.zip" "https://github.com/arpanghosh8453/garmin-grafana
|
|||||||
unzip -q "${RELEASE}.zip"
|
unzip -q "${RELEASE}.zip"
|
||||||
# Remove the v prefix to RELEASE if it exists
|
# Remove the v prefix to RELEASE if it exists
|
||||||
if [[ "${RELEASE}" == v* ]]; then
|
if [[ "${RELEASE}" == v* ]]; then
|
||||||
RELEASE="${RELEASE:1}"
|
RELEASE="${RELEASE:1}"
|
||||||
fi
|
fi
|
||||||
mv "garmin-grafana-${RELEASE}/" "/opt/garmin-grafana"
|
mv "garmin-grafana-${RELEASE}/" "/opt/garmin-grafana"
|
||||||
mkdir -p /opt/garmin-grafana/.garminconnect
|
mkdir -p /opt/garmin-grafana/.garminconnect
|
||||||
@ -112,9 +112,9 @@ msg_info "Setting up garmin-grafana"
|
|||||||
# Check if using Chinese garmin servers
|
# Check if using Chinese garmin servers
|
||||||
read -rp "Are you using Garmin in mainland China? (y/N): " prompt
|
read -rp "Are you using Garmin in mainland China? (y/N): " prompt
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes|Y)$ ]]; then
|
||||||
GARMIN_CN="True"
|
GARMIN_CN="True"
|
||||||
else
|
else
|
||||||
GARMIN_CN="False"
|
GARMIN_CN="False"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat <<EOF >/opt/garmin-grafana/.env
|
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,
|
# 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
|
# 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
|
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 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 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
|
read -r -p "Please enter your MFA Code (if applicable, leave blank if not): " GARMIN_MFA
|
||||||
# Run the script once to prompt for credential
|
# Run the script once to prompt for credential
|
||||||
msg_info "Creating Garmin credentials, this will timeout in 60 seconds"
|
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
|
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_EMAIL}
|
||||||
${GARMIN_PASSWORD}
|
${GARMIN_PASSWORD}
|
||||||
${GARMIN_MFA}
|
${GARMIN_MFA}
|
||||||
EOF
|
EOF
|
||||||
unset GARMIN_EMAIL
|
unset GARMIN_EMAIL
|
||||||
unset GARMIN_PASSWORD
|
unset GARMIN_PASSWORD
|
||||||
unset GARMIN_MFA
|
unset GARMIN_MFA
|
||||||
# Check if there is anything in the token dir now
|
# Check if there is anything in the token dir now
|
||||||
if [ -z "$(ls -A /opt/garmin-grafana/.garminconnect)" ]; then
|
if [ -z "$(ls -A /opt/garmin-grafana/.garminconnect)" ]; then
|
||||||
msg_error "Failed to create a token"
|
msg_error "Failed to create a token"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$STD systemctl restart grafana-server
|
$STD systemctl restart grafana-server
|
||||||
|
@ -8,18 +8,18 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
python3 \
|
python3 \
|
||||||
openssl \
|
openssl \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates
|
ca-certificates
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="15" setup_postgresql
|
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 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;"
|
$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 "Ghostfolio Credentials"
|
||||||
echo "Database User: $DB_USER"
|
echo "Database User: $DB_USER"
|
||||||
echo "Database Password: $DB_PASS"
|
echo "Database Password: $DB_PASS"
|
||||||
echo "Database Name: $DB_NAME"
|
echo "Database Name: $DB_NAME"
|
||||||
echo "Redis Password: $REDIS_PASS"
|
echo "Redis Password: $REDIS_PASS"
|
||||||
echo "Access Token Salt: $ACCESS_TOKEN_SALT"
|
echo "Access Token Salt: $ACCESS_TOKEN_SALT"
|
||||||
echo "JWT Secret Key: $JWT_SECRET_KEY"
|
echo "JWT Secret Key: $JWT_SECRET_KEY"
|
||||||
if [[ -n "${COINGECKO_DEMO_KEY:-}" ]]; then
|
if [[ -n "${COINGECKO_DEMO_KEY:-}" ]]; then
|
||||||
echo "CoinGecko Demo API Key: $COINGECKO_DEMO_KEY"
|
echo "CoinGecko Demo API Key: $COINGECKO_DEMO_KEY"
|
||||||
fi
|
fi
|
||||||
if [[ -n "${COINGECKO_PRO_KEY:-}" ]]; then
|
if [[ -n "${COINGECKO_PRO_KEY:-}" ]]; then
|
||||||
echo "CoinGecko Pro API Key: $COINGECKO_PRO_KEY"
|
echo "CoinGecko Pro API Key: $COINGECKO_PRO_KEY"
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "To add CoinGecko API keys later, edit: /opt/ghostfolio/.env"
|
echo "To add CoinGecko API keys later, edit: /opt/ghostfolio/.env"
|
||||||
} >>~/ghostfolio.creds
|
} >>~/ghostfolio.creds
|
||||||
msg_ok "Set up Database"
|
msg_ok "Set up Database"
|
||||||
|
|
||||||
@ -101,11 +101,11 @@ HOST=0.0.0.0
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [[ -n "${COINGECKO_DEMO_KEY:-}" ]]; then
|
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
|
fi
|
||||||
|
|
||||||
if [[ -n "${COINGECKO_PRO_KEY:-}" ]]; then
|
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
|
fi
|
||||||
msg_ok "Set up Environment"
|
msg_ok "Set up Environment"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||||
{
|
{
|
||||||
echo "Hanko-Credentials"
|
echo "Hanko-Credentials"
|
||||||
echo "Hanko Database User: $DB_USER"
|
echo "Hanko Database User: $DB_USER"
|
||||||
echo "Hanko Database Password: $DB_PASS"
|
echo "Hanko Database Password: $DB_PASS"
|
||||||
echo "Hanko Database Name: $DB_NAME"
|
echo "Hanko Database Name: $DB_NAME"
|
||||||
} >>~/hanko.creds
|
} >>~/hanko.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
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"
|
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
|
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" \
|
env DB_USER="$DB_USER" DB_PASS="$DB_PASS" APP_SECRET="$APP_SECRET" \
|
||||||
yq eval '
|
yq eval '
|
||||||
.database.user = strenv(DB_USER) |
|
.database.user = strenv(DB_USER) |
|
||||||
.database.password = strenv(DB_PASS) |
|
.database.password = strenv(DB_PASS) |
|
||||||
.database.host = "localhost" |
|
.database.host = "localhost" |
|
||||||
|
@ -8,15 +8,15 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
git \
|
git \
|
||||||
rsync
|
rsync
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="17" setup_postgresql
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||||
{
|
{
|
||||||
echo "Joplin-Credentials"
|
echo "Joplin-Credentials"
|
||||||
echo "Joplin Database User: $DB_USER"
|
echo "Joplin Database User: $DB_USER"
|
||||||
echo "Joplin Database Password: $DB_PASS"
|
echo "Joplin Database Password: $DB_PASS"
|
||||||
echo "Joplin Database Name: $DB_NAME"
|
echo "Joplin Database Name: $DB_NAME"
|
||||||
} >>~/joplin.creds
|
} >>~/joplin.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
msg_ok "Set up PostgreSQL Database"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
||||||
{
|
{
|
||||||
echo "Kanba-Credentials"
|
echo "Kanba-Credentials"
|
||||||
echo "Kanba Database Name: $DB_NAME"
|
echo "Kanba Database Name: $DB_NAME"
|
||||||
echo "Kanba Database User: $DB_USER"
|
echo "Kanba Database User: $DB_USER"
|
||||||
echo "Kanba Database Password: $DB_PASS"
|
echo "Kanba Database Password: $DB_PASS"
|
||||||
} >>~/kanba.creds
|
} >>~/kanba.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
msg_ok "Set up PostgreSQL Database"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
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 "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;"
|
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||||
{
|
{
|
||||||
echo "Leantime Credentials"
|
echo "Leantime Credentials"
|
||||||
echo "Database User: $DB_USER"
|
echo "Database User: $DB_USER"
|
||||||
echo "Database Password: $DB_PASS"
|
echo "Database Password: $DB_PASS"
|
||||||
echo "Database Name: $DB_NAME"
|
echo "Database Name: $DB_NAME"
|
||||||
} >>~/leantime.creds
|
} >>~/leantime.creds
|
||||||
msg_ok "Set up Database"
|
msg_ok "Set up Database"
|
||||||
|
|
||||||
@ -59,10 +59,10 @@ cat <<EOF >/etc/apache2/sites-enabled/000-default.conf
|
|||||||
EOF
|
EOF
|
||||||
mv "/opt/leantime/config/sample.env" "/opt/leantime/config/.env"
|
mv "/opt/leantime/config/sample.env" "/opt/leantime/config/.env"
|
||||||
sed -i -e "s|^LEAN_DB_DATABASE.*|LEAN_DB_DATABASE = '$DB_NAME'|" \
|
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_USER.*|LEAN_DB_USER = '$DB_USER'|" \
|
||||||
-e "s|^LEAN_DB_PASSWORD.*|LEAN_DB_PASSWORD = '$DB_PASS'|" \
|
-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)'|" \
|
-e "s|^LEAN_SESSION_PASSWORD.*|LEAN_SESSION_PASSWORD = '$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)'|" \
|
||||||
"/opt/leantime/config/.env"
|
"/opt/leantime/config/.env"
|
||||||
$STD a2enmod -q proxy_fcgi setenvif rewrite
|
$STD a2enmod -q proxy_fcgi setenvif rewrite
|
||||||
$STD a2enconf -q "php8.4-fpm"
|
$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"
|
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"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
lsb-release \
|
lsb-release \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
acl \
|
acl \
|
||||||
fping \
|
fping \
|
||||||
graphviz \
|
graphviz \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
mtr-tiny \
|
mtr-tiny \
|
||||||
nginx \
|
nginx \
|
||||||
nmap \
|
nmap \
|
||||||
rrdtool \
|
rrdtool \
|
||||||
snmp \
|
snmp \
|
||||||
snmpd
|
snmpd
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="gmp,mysql,snmp" setup_php
|
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"
|
msg_info "Installing Python"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
python3-{dotenv,pymysql,redis,setuptools,systemd,pip}
|
python3-{dotenv,pymysql,redis,setuptools,systemd,pip}
|
||||||
msg_ok "Installed Python"
|
msg_ok "Installed Python"
|
||||||
|
|
||||||
msg_info "Configuring Database"
|
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 "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;"
|
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||||
{
|
{
|
||||||
echo "LibreNMS-Credentials"
|
echo "LibreNMS-Credentials"
|
||||||
echo "LibreNMS Database User: $DB_USER"
|
echo "LibreNMS Database User: $DB_USER"
|
||||||
echo "LibreNMS Database Password: $DB_PASS"
|
echo "LibreNMS Database Password: $DB_PASS"
|
||||||
echo "LibreNMS Database Name: $DB_NAME"
|
echo "LibreNMS Database Name: $DB_NAME"
|
||||||
} >>~/librenms.creds
|
} >>~/librenms.creds
|
||||||
msg_ok "Configured Database"
|
msg_ok "Configured Database"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -47,7 +47,7 @@ $STD mix local.hex --force
|
|||||||
$STD mix local.rebar --force
|
$STD mix local.rebar --force
|
||||||
$STD mix escript.install hex livebook --force
|
$STD mix escript.install hex livebook --force
|
||||||
|
|
||||||
cat <<EOF > /opt/livebook/.env
|
cat <<EOF >/opt/livebook/.env
|
||||||
export HOME=/opt/livebook
|
export HOME=/opt/livebook
|
||||||
export ERLANG_VERSION=$ERLANG_VERSION
|
export ERLANG_VERSION=$ERLANG_VERSION
|
||||||
export ELIXIR_VERSION=$ELIXIR_VERSION
|
export ELIXIR_VERSION=$ELIXIR_VERSION
|
||||||
@ -89,7 +89,7 @@ systemctl enable -q --now livebook
|
|||||||
msg_ok "Installed Livebook"
|
msg_ok "Installed Livebook"
|
||||||
|
|
||||||
msg_info "Saving Livebook credentials"
|
msg_info "Saving Livebook credentials"
|
||||||
cat <<EOF > /opt/livebook/livebook.creds
|
cat <<EOF >/opt/livebook/livebook.creds
|
||||||
Livebook-Credentials
|
Livebook-Credentials
|
||||||
Livebook Password: $LIVEBOOK_PASSWORD
|
Livebook Password: $LIVEBOOK_PASSWORD
|
||||||
EOF
|
EOF
|
||||||
|
@ -7,23 +7,23 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
lsb-release \
|
lsb-release \
|
||||||
rbenv \
|
rbenv \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
libarchive-dev \
|
libarchive-dev \
|
||||||
git \
|
git \
|
||||||
libmariadb-dev \
|
libmariadb-dev \
|
||||||
redis-server \
|
redis-server \
|
||||||
nginx \
|
nginx \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libyaml-dev
|
libyaml-dev
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="16" setup_postgresql
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
||||||
{
|
{
|
||||||
echo "Manyfold Credentials"
|
echo "Manyfold Credentials"
|
||||||
echo "Manyfold Database User: $DB_USER"
|
echo "Manyfold Database User: $DB_USER"
|
||||||
echo "Manyfold Database Password: $DB_PASS"
|
echo "Manyfold Database Password: $DB_PASS"
|
||||||
echo "Manyfold Database Name: $DB_NAME"
|
echo "Manyfold Database Name: $DB_NAME"
|
||||||
} >>~/manyfold.creds
|
} >>~/manyfold.creds
|
||||||
msg_ok "Set up PostgreSQL"
|
msg_ok "Set up PostgreSQL"
|
||||||
|
|
||||||
|
@ -8,37 +8,37 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
openssl \
|
openssl \
|
||||||
redis \
|
redis \
|
||||||
libgbm1 \
|
libgbm1 \
|
||||||
libnss3 \
|
libnss3 \
|
||||||
libatk1.0-0 \
|
libatk1.0-0 \
|
||||||
libatk-bridge2.0-0 \
|
libatk-bridge2.0-0 \
|
||||||
libdrm2 \
|
libdrm2 \
|
||||||
libxkbcommon0 \
|
libxkbcommon0 \
|
||||||
libglib2.0-0 \
|
libglib2.0-0 \
|
||||||
libdbus-1-3 \
|
libdbus-1-3 \
|
||||||
libx11-xcb1 \
|
libx11-xcb1 \
|
||||||
libxcb1 \
|
libxcb1 \
|
||||||
libxcomposite1 \
|
libxcomposite1 \
|
||||||
libxcursor1 \
|
libxcursor1 \
|
||||||
libxdamage1 \
|
libxdamage1 \
|
||||||
libxext6 \
|
libxext6 \
|
||||||
libxi6 \
|
libxi6 \
|
||||||
libxtst6 \
|
libxtst6 \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
libxrandr2 \
|
libxrandr2 \
|
||||||
libasound2 \
|
libasound2 \
|
||||||
libxss1 \
|
libxss1 \
|
||||||
libxinerama1 \
|
libxinerama1 \
|
||||||
nginx
|
nginx
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION=17 setup_postgresql
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||||
{
|
{
|
||||||
echo "Maxun-Credentials"
|
echo "Maxun-Credentials"
|
||||||
echo "Maxun Database User: $DB_USER"
|
echo "Maxun Database User: $DB_USER"
|
||||||
echo "Maxun Database Password: $DB_PASS"
|
echo "Maxun Database Password: $DB_PASS"
|
||||||
echo "Maxun Database Name: $DB_NAME"
|
echo "Maxun Database Name: $DB_NAME"
|
||||||
echo "Maxun JWT Secret: $JWT_SECRET"
|
echo "Maxun JWT Secret: $JWT_SECRET"
|
||||||
echo "Maxun Encryption Key: $ENCRYPTION_KEY"
|
echo "Maxun Encryption Key: $ENCRYPTION_KEY"
|
||||||
echo "Maxun Session Secret: $SESSION_SECRET"
|
echo "Maxun Session Secret: $SESSION_SECRET"
|
||||||
} >>~/maxun.creds
|
} >>~/maxun.creds
|
||||||
msg_ok "Set up Database"
|
msg_ok "Set up Database"
|
||||||
|
|
||||||
@ -98,9 +98,9 @@ LimitNOFILE=65536
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
{
|
{
|
||||||
echo "__________________"
|
echo "__________________"
|
||||||
echo "MinIO Admin User: $MINIO_USER"
|
echo "MinIO Admin User: $MINIO_USER"
|
||||||
echo "MinIO Admin Password: $MINIO_PASS"
|
echo "MinIO Admin Password: $MINIO_PASS"
|
||||||
} >>~/maxun.creds
|
} >>~/maxun.creds
|
||||||
cat <<EOF >/etc/default/minio
|
cat <<EOF >/etc/default/minio
|
||||||
MINIO_ROOT_USER=${MINIO_USER}
|
MINIO_ROOT_USER=${MINIO_USER}
|
||||||
|
@ -8,16 +8,16 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
make \
|
make \
|
||||||
git \
|
git \
|
||||||
caddy
|
caddy
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||||
|
@ -8,16 +8,16 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apk add \
|
$STD apk add \
|
||||||
tzdata \
|
tzdata \
|
||||||
gawk \
|
gawk \
|
||||||
yq
|
yq
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Docker & Compose"
|
msg_info "Installing Docker & Compose"
|
||||||
@ -26,7 +26,7 @@ $STD rc-service docker start
|
|||||||
$STD rc-update add docker default
|
$STD rc-update add docker default
|
||||||
|
|
||||||
get_latest_release() {
|
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_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
|
||||||
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||||
@ -42,17 +42,17 @@ msg_ok "Fetched NPMplus"
|
|||||||
|
|
||||||
attempts=0
|
attempts=0
|
||||||
while true; do
|
while true; do
|
||||||
read -r -p "${TAB3}Enter your TZ Identifier (e.g., Europe/Berlin): " TZ_INPUT
|
read -r -p "${TAB3}Enter your TZ Identifier (e.g., Europe/Berlin): " TZ_INPUT
|
||||||
if validate_tz "$TZ_INPUT"; then
|
if validate_tz "$TZ_INPUT"; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
msg_error "Invalid timezone! Please enter a valid TZ identifier."
|
msg_error "Invalid timezone! Please enter a valid TZ identifier."
|
||||||
|
|
||||||
attempts=$((attempts + 1))
|
attempts=$((attempts + 1))
|
||||||
if [[ "$attempts" -ge 3 ]]; then
|
if [[ "$attempts" -ge 3 ]]; then
|
||||||
msg_error "Maximum attempts reached. Exiting."
|
msg_error "Maximum attempts reached. Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
read -r -p "${TAB3}Enter your ACME Email: " ACME_EMAIL_INPUT
|
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
|
$STD docker compose up -d
|
||||||
CONTAINER_ID=""
|
CONTAINER_ID=""
|
||||||
for i in {1..60}; do
|
for i in {1..60}; do
|
||||||
CONTAINER_ID=$(docker ps --filter "name=npmplus" --format "{{.ID}}")
|
CONTAINER_ID=$(docker ps --filter "name=npmplus" --format "{{.ID}}")
|
||||||
if [[ -n "$CONTAINER_ID" ]]; then
|
if [[ -n "$CONTAINER_ID" ]]; then
|
||||||
STATUS=$(docker inspect --format '{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || echo "starting")
|
STATUS=$(docker inspect --format '{{.State.Health.Status}}' "$CONTAINER_ID" 2>/dev/null || echo "starting")
|
||||||
if [[ "$STATUS" == "healthy" ]]; then
|
if [[ "$STATUS" == "healthy" ]]; then
|
||||||
msg_ok "NPMplus is running and healthy"
|
msg_ok "NPMplus is running and healthy"
|
||||||
break
|
break
|
||||||
elif [[ "$STATUS" == "unhealthy" ]]; then
|
elif [[ "$STATUS" == "unhealthy" ]]; then
|
||||||
msg_error "NPMplus container is unhealthy! Check logs."
|
msg_error "NPMplus container is unhealthy! Check logs."
|
||||||
docker logs "$CONTAINER_ID"
|
docker logs "$CONTAINER_ID"
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
sleep 2
|
||||||
sleep 2
|
[[ $i -eq 60 ]] && msg_error "NPMplus container did not become healthy within 120s." && docker logs "$CONTAINER_ID" && exit 1
|
||||||
[[ $i -eq 60 ]] && msg_error "NPMplus container did not become healthy within 120s." && docker logs "$CONTAINER_ID" && exit 1
|
|
||||||
done
|
done
|
||||||
msg_ok "Builded and started NPMplus"
|
msg_ok "Builded and started NPMplus"
|
||||||
|
|
||||||
@ -91,34 +91,34 @@ msg_info "Retrieving Default Login (Patience)"
|
|||||||
PASSWORD_FOUND=0
|
PASSWORD_FOUND=0
|
||||||
|
|
||||||
for i in {1..60}; do
|
for i in {1..60}; do
|
||||||
PASSWORD_LINE=$(
|
PASSWORD_LINE=$(
|
||||||
{ awk '/Creating a new user:/{print; exit}' < <(docker logs "$CONTAINER_ID" 2>&1); } || true
|
{ awk '/Creating a new user:/{print; exit}' < <(docker logs "$CONTAINER_ID" 2>&1); } || true
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ -n "${PASSWORD_LINE:-}" ]]; then
|
if [[ -n "${PASSWORD_LINE:-}" ]]; then
|
||||||
PASSWORD="${PASSWORD_LINE#*password: }"
|
PASSWORD="${PASSWORD_LINE#*password: }"
|
||||||
printf 'username: admin@example.org\npassword: %s\n' "$PASSWORD" >/opt/.npm_pwd
|
printf 'username: admin@example.org\npassword: %s\n' "$PASSWORD" >/opt/.npm_pwd
|
||||||
msg_ok "Saved default login to /opt/.npm_pwd"
|
msg_ok "Saved default login to /opt/.npm_pwd"
|
||||||
PASSWORD_FOUND=1
|
PASSWORD_FOUND=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
if [[ $PASSWORD_FOUND -eq 0 ]]; then
|
if [[ $PASSWORD_FOUND -eq 0 ]]; then
|
||||||
PASSWORD_LINE=$(
|
PASSWORD_LINE=$(
|
||||||
timeout 30s bash -c '
|
timeout 30s bash -c '
|
||||||
docker logs -f --since=0s --tail=0 "$1" 2>&1 | awk "/Creating a new user:/{print; exit}"
|
docker logs -f --since=0s --tail=0 "$1" 2>&1 | awk "/Creating a new user:/{print; exit}"
|
||||||
' _ "$CONTAINER_ID" || true
|
' _ "$CONTAINER_ID" || true
|
||||||
)
|
)
|
||||||
if [[ -n "${PASSWORD_LINE:-}" ]]; then
|
if [[ -n "${PASSWORD_LINE:-}" ]]; then
|
||||||
PASSWORD="${PASSWORD_LINE#*password: }"
|
PASSWORD="${PASSWORD_LINE#*password: }"
|
||||||
printf 'username: admin@example.org\npassword: %s\n' "$PASSWORD" >/opt/.npm_pwd
|
printf 'username: admin@example.org\npassword: %s\n' "$PASSWORD" >/opt/.npm_pwd
|
||||||
msg_ok "Saved default login to /opt/.npm_pwd (live)"
|
msg_ok "Saved default login to /opt/.npm_pwd (live)"
|
||||||
PASSWORD_FOUND=1
|
PASSWORD_FOUND=1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $PASSWORD_FOUND -eq 0 ]]; then
|
if [[ $PASSWORD_FOUND -eq 0 ]]; then
|
||||||
msg_error "Could not retrieve default login after 120s."
|
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"
|
echo -e "\nYou can manually check the container logs with:\n docker logs $CONTAINER_ID | grep 'Creating a new user:'\n"
|
||||||
fi
|
fi
|
||||||
|
@ -8,22 +8,22 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
read -r -p "Enter the hostname of your OpenCloud server (eg cloud.domain.tld): " oc_host
|
read -r -p "Enter the hostname of your OpenCloud server (eg cloud.domain.tld): " oc_host
|
||||||
if [[ "$oc_host" ]]; then
|
if [[ "$oc_host" ]]; then
|
||||||
OC_HOST="$oc_host"
|
OC_HOST="$oc_host"
|
||||||
fi
|
fi
|
||||||
read -r -p "Enter the hostname of your Collabora server (eg collabora.domain.tld): " collabora_host
|
read -r -p "Enter the hostname of your Collabora server (eg collabora.domain.tld): " collabora_host
|
||||||
if [[ "$collabora_host" ]]; then
|
if [[ "$collabora_host" ]]; then
|
||||||
COLLABORA_HOST="$collabora_host"
|
COLLABORA_HOST="$collabora_host"
|
||||||
fi
|
fi
|
||||||
read -r -p "Enter the hostname of your WOPI server (eg wopiserver.domain.tld): " wopi_host
|
read -r -p "Enter the hostname of your WOPI server (eg wopiserver.domain.tld): " wopi_host
|
||||||
if [[ "$wopi_host" ]]; then
|
if [[ "$wopi_host" ]]; then
|
||||||
WOPI_HOST="$wopi_host"
|
WOPI_HOST="$wopi_host"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Installing Collabora Online"
|
msg_info "Installing Collabora Online"
|
||||||
|
@ -8,20 +8,20 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
msg_info "Installing dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
supervisor \
|
supervisor \
|
||||||
debian-keyring \
|
debian-keyring \
|
||||||
debian-archive-keyring \
|
debian-archive-keyring \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
redis
|
redis
|
||||||
msg_ok "Installed dependencies"
|
msg_ok "Installed dependencies"
|
||||||
|
|
||||||
NODE_VERSION="20" setup_nodejs
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||||
{
|
{
|
||||||
echo "Postiz DB Credentials"
|
echo "Postiz DB Credentials"
|
||||||
echo "Postiz Database User: $DB_USER"
|
echo "Postiz Database User: $DB_USER"
|
||||||
echo "Postiz Database Password: $DB_PASS"
|
echo "Postiz Database Password: $DB_PASS"
|
||||||
echo "Postiz Database Name: $DB_NAME"
|
echo "Postiz Database Name: $DB_NAME"
|
||||||
} >>~/postiz.creds
|
} >>~/postiz.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
msg_ok "Set up PostgreSQL Database"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -19,9 +19,9 @@ echo "deb [signed-by=/usr/share/keyrings/proxmox-archive-keyring.gpg] http://dow
|
|||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
DEBIAN_FRONTEND=noninteractive
|
DEBIAN_FRONTEND=noninteractive
|
||||||
$STD apt-get -o Dpkg::Options::="--force-confdef" \
|
$STD apt-get -o Dpkg::Options::="--force-confdef" \
|
||||||
-o Dpkg::Options::="--force-confold" \
|
-o Dpkg::Options::="--force-confold" \
|
||||||
install -y proxmox-datacenter-manager \
|
install -y proxmox-datacenter-manager \
|
||||||
proxmox-datacenter-manager-ui
|
proxmox-datacenter-manager-ui
|
||||||
msg_ok "Installed Proxmox Datacenter Manager"
|
msg_ok "Installed Proxmox Datacenter Manager"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
@ -9,27 +9,27 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
msg_info "Installing dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
acl \
|
acl \
|
||||||
build-essential \
|
build-essential \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-venv \
|
python3-venv \
|
||||||
libmariadb3 \
|
libmariadb3 \
|
||||||
libmariadb-dev \
|
libmariadb-dev \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
redis-tools \
|
redis-tools \
|
||||||
p7zip \
|
p7zip \
|
||||||
tzdata \
|
tzdata \
|
||||||
jq
|
jq
|
||||||
msg_ok "Installed core dependencies"
|
msg_ok "Installed core dependencies"
|
||||||
|
|
||||||
PYTHON_VERSION="3.12" setup_uv
|
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 "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;"
|
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||||
{
|
{
|
||||||
echo "RomM-Credentials"
|
echo "RomM-Credentials"
|
||||||
echo "RomM Database User: $DB_USER"
|
echo "RomM Database User: $DB_USER"
|
||||||
echo "RomM Database Password: $DB_PASS"
|
echo "RomM Database Password: $DB_PASS"
|
||||||
echo "RomM Database Name: $DB_NAME"
|
echo "RomM Database Name: $DB_NAME"
|
||||||
} >~/romm.creds
|
} >~/romm.creds
|
||||||
chmod 600 ~/romm.creds
|
chmod 600 ~/romm.creds
|
||||||
msg_ok "Configured Database"
|
msg_ok "Configured Database"
|
||||||
@ -55,11 +55,11 @@ msg_ok "Configured Database"
|
|||||||
msg_info "Creating romm user and directories"
|
msg_info "Creating romm user and directories"
|
||||||
id -u romm &>/dev/null || useradd -r -m -d /var/lib/romm -s /bin/bash romm
|
id -u romm &>/dev/null || useradd -r -m -d /var/lib/romm -s /bin/bash romm
|
||||||
mkdir -p /opt/romm \
|
mkdir -p /opt/romm \
|
||||||
/var/lib/romm/config \
|
/var/lib/romm/config \
|
||||||
/var/lib/romm/resources \
|
/var/lib/romm/resources \
|
||||||
/var/lib/romm/assets/{saves,states,screenshots} \
|
/var/lib/romm/assets/{saves,states,screenshots} \
|
||||||
/var/lib/romm/library/roms/{gba,gbc,ps} \
|
/var/lib/romm/library/roms/{gba,gbc,ps} \
|
||||||
/var/lib/romm/library/bios/{gba,ps}
|
/var/lib/romm/library/bios/{gba,ps}
|
||||||
chown -R romm:romm /opt/romm /var/lib/romm
|
chown -R romm:romm /opt/romm /var/lib/romm
|
||||||
msg_ok "Created romm user and directories"
|
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 "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;"
|
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||||
{
|
{
|
||||||
echo "RomM-Credentials"
|
echo "RomM-Credentials"
|
||||||
echo "RomM Database User: $DB_USER"
|
echo "RomM Database User: $DB_USER"
|
||||||
echo "RomM Database Password: $DB_PASS"
|
echo "RomM Database Password: $DB_PASS"
|
||||||
echo "RomM Database Name: $DB_NAME"
|
echo "RomM Database Name: $DB_NAME"
|
||||||
} >~/romm.creds
|
} >~/romm.creds
|
||||||
msg_ok "Configured Database"
|
msg_ok "Configured Database"
|
||||||
|
|
||||||
|
@ -8,19 +8,18 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
caddy \
|
caddy \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
ca-certificates
|
ca-certificates
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
|
||||||
setup_clickhouse
|
setup_clickhouse
|
||||||
PG_VERSION=17 setup_postgresql
|
PG_VERSION=17 setup_postgresql
|
||||||
NODE_VERSION="20" NODE_MODULE="next" setup_nodejs
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||||
{
|
{
|
||||||
echo "Rybbit-Credentials"
|
echo "Rybbit-Credentials"
|
||||||
echo "Rybbit Database User: $DB_USER"
|
echo "Rybbit Database User: $DB_USER"
|
||||||
echo "Rybbit Database Password: $DB_PASS"
|
echo "Rybbit Database Password: $DB_PASS"
|
||||||
echo "Rybbit Database Name: $DB_NAME"
|
echo "Rybbit Database Name: $DB_NAME"
|
||||||
} >>~/rybbit.creds
|
} >>~/rybbit.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
msg_ok "Set up PostgreSQL Database"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -8,15 +8,15 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
ca-certificates
|
ca-certificates
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
JAVA_VERSION="21" setup_java
|
JAVA_VERSION="21" setup_java
|
||||||
@ -66,7 +66,7 @@ Restart=on-failure
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now zookeeper
|
systemctl enable -q --now zookeeper
|
||||||
msg_ok "Setup Zookeeper"
|
msg_ok "Setup Zookeeper"
|
||||||
|
|
||||||
msg_info "Configuring ClickHouse"
|
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"
|
msg_info "Running ClickHouse migrations"
|
||||||
cd /opt/signoz-schema-migrator/bin
|
cd /opt/signoz-schema-migrator/bin
|
||||||
$STD ./signoz-schema-migrator sync --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=
|
$STD ./signoz-schema-migrator async --dsn="tcp://localhost:9000?password=" --replication=true --up=
|
||||||
msg_ok "ClickHouse Migrations Completed"
|
msg_ok "ClickHouse Migrations Completed"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "signoz" "SigNoz/signoz" "prebuild" "latest" "/opt/signoz" "signoz-community_linux_amd64.tar.gz"
|
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"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
@ -16,18 +16,18 @@ update_os
|
|||||||
msg_info "Setting Up Hardware Acceleration"
|
msg_info "Setting Up Hardware Acceleration"
|
||||||
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
||||||
if [[ "$CTTYPE" == "0" ]]; then
|
if [[ "$CTTYPE" == "0" ]]; then
|
||||||
chgrp video /dev/dri
|
chgrp video /dev/dri
|
||||||
chmod 755 /dev/dri
|
chmod 755 /dev/dri
|
||||||
chmod 660 /dev/dri/*
|
chmod 660 /dev/dri/*
|
||||||
$STD adduser $(id -u -n) video
|
$STD adduser $(id -u -n) video
|
||||||
$STD adduser $(id -u -n) render
|
$STD adduser $(id -u -n) render
|
||||||
fi
|
fi
|
||||||
msg_ok "Set Up Hardware Acceleration"
|
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
|
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
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Installing Intel Hardware Acceleration (non-free)"
|
msg_info "Installing Intel Hardware Acceleration (non-free)"
|
||||||
cat <<EOF >/etc/apt/sources.list.d/non-free.list
|
cat <<EOF >/etc/apt/sources.list.d/non-free.list
|
||||||
|
|
||||||
deb http://deb.debian.org/debian bookworm non-free non-free-firmware
|
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
|
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 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
|
deb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware
|
||||||
EOF
|
EOF
|
||||||
$STD apt-get update
|
$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 -y install {intel-media-va-driver-non-free,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
||||||
else
|
else
|
||||||
msg_info "Installing Intel Hardware Acceleration"
|
msg_info "Installing Intel Hardware Acceleration"
|
||||||
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools}
|
||||||
fi
|
fi
|
||||||
msg_ok "Installed and Set Up Intel Hardware Acceleration"
|
msg_ok "Installed and Set Up Intel Hardware Acceleration"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
@ -8,19 +8,19 @@
|
|||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
python3-opencv jq \
|
python3-opencv jq \
|
||||||
libgl1-mesa-glx libglib2.0-0 \
|
libgl1-mesa-glx libglib2.0-0 \
|
||||||
libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 \
|
libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 \
|
||||||
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav \
|
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 \
|
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
|
cmake gfortran libopenblas-dev liblapack-dev libgirepository1.0-dev git
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PYTHON_VERSION="3.12" setup_uv
|
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 default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||||
{
|
{
|
||||||
echo "Hanko-Credentials"
|
echo "Hanko-Credentials"
|
||||||
echo "Hanko Database User: $DB_USER"
|
echo "Hanko Database User: $DB_USER"
|
||||||
echo "Hanko Database Password: $DB_PASS"
|
echo "Hanko Database Password: $DB_PASS"
|
||||||
echo "Hanko Database Name: $DB_NAME"
|
echo "Hanko Database Name: $DB_NAME"
|
||||||
} >>~/hanko.creds
|
} >>~/hanko.creds
|
||||||
msg_ok "Set up PostgreSQL Database"
|
msg_ok "Set up PostgreSQL Database"
|
||||||
|
|
||||||
@ -61,16 +61,16 @@ msg_ok "Python Environment Setup"
|
|||||||
|
|
||||||
msg_info "Setup Viseron (Patience)"
|
msg_info "Setup Viseron (Patience)"
|
||||||
if ls /dev/nvidia* >/dev/null 2>&1; then
|
if ls /dev/nvidia* >/dev/null 2>&1; then
|
||||||
msg_info "GPU detected → Installing PyTorch with CUDA"
|
msg_info "GPU detected → Installing PyTorch with CUDA"
|
||||||
UV_HTTP_TIMEOUT=600 uv pip install --python /opt/viseron/.venv/bin/python \
|
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
|
torch==2.8.0 torchvision==0.19.0 torchaudio==2.8.0
|
||||||
msg_ok "Installed Torch with CUDA"
|
msg_ok "Installed Torch with CUDA"
|
||||||
else
|
else
|
||||||
msg_info "No GPU detected → Installing CPU-only PyTorch"
|
msg_info "No GPU detected → Installing CPU-only PyTorch"
|
||||||
UV_HTTP_TIMEOUT=600 uv pip install --python /opt/viseron/.venv/bin/python \
|
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 \
|
torch==2.8.0+cpu torchvision==0.19.0+cpu torchaudio==2.8.0+cpu \
|
||||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
msg_ok "Installed Torch CPU-only"
|
msg_ok "Installed Torch CPU-only"
|
||||||
fi
|
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 -e /opt/viseron/.
|
||||||
UV_HTTP_TIMEOUT=600 uv pip install --python /opt/viseron/.venv/bin/python -r /opt/viseron/requirements.txt
|
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)
|
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
catch_errors
|
init_error_traps
|
||||||
setting_up_container
|
setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
msg_info "Installing Dependencies (Patience)"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
make \
|
make \
|
||||||
apache2 \
|
apache2 \
|
||||||
libapache2-mod-php \
|
libapache2-mod-php \
|
||||||
redis
|
redis
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
setup_mariadb
|
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 "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;"
|
$STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||||
{
|
{
|
||||||
echo "Wallabag Credentials"
|
echo "Wallabag Credentials"
|
||||||
echo "Database User: $DB_USER"
|
echo "Database User: $DB_USER"
|
||||||
echo "Database Password: $DB_PASS"
|
echo "Database Password: $DB_PASS"
|
||||||
echo "Database Name: $DB_NAME"
|
echo "Database Name: $DB_NAME"
|
||||||
} >>~/wallabag.creds
|
} >>~/wallabag.creds
|
||||||
msg_ok "Set up Database"
|
msg_ok "Set up Database"
|
||||||
|
|
||||||
@ -48,12 +48,12 @@ useradd -d /opt/wallabag -s /bin/bash -M wallabag
|
|||||||
chown -R wallabag:wallabag /opt/wallabag
|
chown -R wallabag:wallabag /opt/wallabag
|
||||||
mv /opt/wallabag/app/config/parameters.yml.dist /opt/wallabag/app/config/parameters.yml
|
mv /opt/wallabag/app/config/parameters.yml.dist /opt/wallabag/app/config/parameters.yml
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's|database_name: wallabag|database_name: wallabag_db|' \
|
-e 's|database_name: wallabag|database_name: wallabag_db|' \
|
||||||
-e 's|database_port: ~|database_port: 3306|' \
|
-e 's|database_port: ~|database_port: 3306|' \
|
||||||
-e 's|database_user: root|database_user: wallabag|' \
|
-e 's|database_user: root|database_user: wallabag|' \
|
||||||
-e 's|database_password: ~|database_password: '"$DB_PASS"'|' \
|
-e 's|database_password: ~|database_password: '"$DB_PASS"'|' \
|
||||||
-e 's|secret: .*|secret: '"$SECRET_KEY"'|' \
|
-e 's|secret: .*|secret: '"$SECRET_KEY"'|' \
|
||||||
/opt/wallabag/app/config/parameters.yml
|
/opt/wallabag/app/config/parameters.yml
|
||||||
|
|
||||||
export COMPOSER_ALLOW_SUPERUSER=1
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
sudo -u wallabag make install --no-interaction
|
sudo -u wallabag make install --no-interaction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user