Compare commits
1 Commits
delete_fil
...
delete_fil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee05f78b52 |
67
ct/anytype-server.sh
Normal file
67
ct/anytype-server.sh
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
|
# Author: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
|
# Source: https://anytype.io
|
||||||
|
|
||||||
|
APP="Anytype-Server"
|
||||||
|
var_tags="${var_tags:-notes;productivity;sync}"
|
||||||
|
var_cpu="${var_cpu:-2}"
|
||||||
|
var_ram="${var_ram:-4096}"
|
||||||
|
var_disk="${var_disk:-16}"
|
||||||
|
var_os="${var_os:-ubuntu}"
|
||||||
|
var_version="${var_version:-24.04}"
|
||||||
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
|
||||||
|
if [[ ! -f /opt/anytype/any-sync-bundle ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if check_for_gh_release "anytype" "grishy/any-sync-bundle"; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl stop anytype
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
msg_info "Backing up Data"
|
||||||
|
cp -r /opt/anytype/data /opt/anytype_data_backup
|
||||||
|
msg_ok "Backed up Data"
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "anytype" "grishy/any-sync-bundle" "prebuild" "latest" "/opt/anytype" "any-sync-bundle_*_linux_amd64.tar.gz"
|
||||||
|
chmod +x /opt/anytype/any-sync-bundle
|
||||||
|
|
||||||
|
msg_info "Restoring Data"
|
||||||
|
cp -r /opt/anytype_data_backup/. /opt/anytype/data
|
||||||
|
rm -rf /opt/anytype_data_backup
|
||||||
|
msg_ok "Restored Data"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
systemctl start anytype
|
||||||
|
msg_ok "Started Service"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:33010${CL}"
|
||||||
|
echo -e "${INFO}${YW} Client config file:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}/opt/anytype/data/client-config.yml${CL}"
|
||||||
61
ct/gluetun.sh
Normal file
61
ct/gluetun.sh
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
|
# Author: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/qdm12/gluetun
|
||||||
|
|
||||||
|
APP="Gluetun"
|
||||||
|
var_tags="${var_tags:-vpn;wireguard;openvpn}"
|
||||||
|
var_cpu="${var_cpu:-2}"
|
||||||
|
var_ram="${var_ram:-2048}"
|
||||||
|
var_disk="${var_disk:-8}"
|
||||||
|
var_os="${var_os:-debian}"
|
||||||
|
var_version="${var_version:-13}"
|
||||||
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
var_tun="${var_tun:-yes}"
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
|
||||||
|
if [[ ! -f /usr/local/bin/gluetun ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if check_for_gh_release "gluetun" "qdm12/gluetun"; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl stop gluetun
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "gluetun" "qdm12/gluetun" "tarball"
|
||||||
|
|
||||||
|
msg_info "Building Gluetun"
|
||||||
|
cd /opt/gluetun
|
||||||
|
$STD go mod download
|
||||||
|
CGO_ENABLED=0 $STD go build -trimpath -ldflags="-s -w" -o /usr/local/bin/gluetun ./cmd/gluetun/
|
||||||
|
msg_ok "Built Gluetun"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
systemctl start gluetun
|
||||||
|
msg_ok "Started Service"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: Matthew Stern (sternma) | MickLesk (CanbiZ)
|
# Author: Matthew Stern (sternma)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
# Source: https://github.com/dmunozv04/iSponsorBlockTV
|
# Source: https://github.com/dmunozv04/iSponsorBlockTV
|
||||||
|
|
||||||
@@ -35,7 +35,27 @@ function update_script() {
|
|||||||
systemctl stop isponsorblocktv
|
systemctl stop isponsorblocktv
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-*-linux"
|
if [[ -d /var/lib/isponsorblocktv ]]; then
|
||||||
|
msg_info "Backing up Data"
|
||||||
|
cp -r /var/lib/isponsorblocktv /var/lib/isponsorblocktv_data_backup
|
||||||
|
msg_ok "Backed up Data"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV"
|
||||||
|
|
||||||
|
msg_info "Setting up iSponsorBlockTV"
|
||||||
|
$STD python3 -m venv /opt/isponsorblocktv/venv
|
||||||
|
$STD /opt/isponsorblocktv/venv/bin/pip install --upgrade pip
|
||||||
|
$STD /opt/isponsorblocktv/venv/bin/pip install /opt/isponsorblocktv
|
||||||
|
msg_ok "Set up iSponsorBlockTV"
|
||||||
|
|
||||||
|
if [[ -d /var/lib/isponsorblocktv_data_backup ]]; then
|
||||||
|
msg_info "Restoring Data"
|
||||||
|
rm -rf /var/lib/isponsorblocktv
|
||||||
|
cp -r /var/lib/isponsorblocktv_data_backup /var/lib/isponsorblocktv
|
||||||
|
rm -rf /var/lib/isponsorblocktv_data_backup
|
||||||
|
msg_ok "Restored Data"
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
systemctl start isponsorblocktv
|
systemctl start isponsorblocktv
|
||||||
|
|||||||
@@ -65,5 +65,3 @@ msg_ok "Completed successfully!\n"
|
|||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||||
echo -e "${INFO}${YW} Before first use, configure auth in:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}/opt/split-pro/.env${CL}"
|
|
||||||
|
|||||||
81
install/anytype-server-install.sh
Normal file
81
install/anytype-server-install.sh
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
|
# Author: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
|
# Source: https://anytype.io
|
||||||
|
|
||||||
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
setup_mongodb
|
||||||
|
|
||||||
|
msg_info "Configuring MongoDB Replica Set"
|
||||||
|
cat <<EOF >>/etc/mongod.conf
|
||||||
|
|
||||||
|
replication:
|
||||||
|
replSetName: "rs0"
|
||||||
|
EOF
|
||||||
|
systemctl restart mongod
|
||||||
|
sleep 3
|
||||||
|
$STD mongosh --eval 'rs.initiate({_id: "rs0", members: [{_id: 0, host: "127.0.0.1:27017"}]})'
|
||||||
|
msg_ok "Configured MongoDB Replica Set"
|
||||||
|
|
||||||
|
msg_info "Installing Redis Stack"
|
||||||
|
setup_deb822_repo \
|
||||||
|
"redis-stack" \
|
||||||
|
"https://packages.redis.io/gpg" \
|
||||||
|
"https://packages.redis.io/deb" \
|
||||||
|
"jammy" \
|
||||||
|
"main"
|
||||||
|
$STD apt install -y redis-stack-server
|
||||||
|
systemctl enable -q --now redis-stack-server
|
||||||
|
msg_ok "Installed Redis Stack"
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "anytype" "grishy/any-sync-bundle" "prebuild" "latest" "/opt/anytype" "any-sync-bundle_*_linux_amd64.tar.gz"
|
||||||
|
chmod +x /opt/anytype/any-sync-bundle
|
||||||
|
|
||||||
|
msg_info "Configuring Anytype"
|
||||||
|
mkdir -p /opt/anytype/data/storage
|
||||||
|
cat <<EOF >/opt/anytype/.env
|
||||||
|
ANY_SYNC_BUNDLE_CONFIG=/opt/anytype/data/bundle-config.yml
|
||||||
|
ANY_SYNC_BUNDLE_CLIENT_CONFIG=/opt/anytype/data/client-config.yml
|
||||||
|
ANY_SYNC_BUNDLE_INIT_STORAGE=/opt/anytype/data/storage/
|
||||||
|
ANY_SYNC_BUNDLE_INIT_EXTERNAL_ADDRS=${LOCAL_IP}
|
||||||
|
ANY_SYNC_BUNDLE_INIT_MONGO_URI=mongodb://127.0.0.1:27017/
|
||||||
|
ANY_SYNC_BUNDLE_INIT_REDIS_URI=redis://127.0.0.1:6379/
|
||||||
|
ANY_SYNC_BUNDLE_LOG_LEVEL=info
|
||||||
|
EOF
|
||||||
|
msg_ok "Configured Anytype"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/anytype.service
|
||||||
|
[Unit]
|
||||||
|
Description=Anytype Sync Server (any-sync-bundle)
|
||||||
|
After=network-online.target mongod.service redis-stack-server.service
|
||||||
|
Wants=network-online.target
|
||||||
|
Requires=mongod.service redis-stack-server.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=/opt/anytype
|
||||||
|
EnvironmentFile=/opt/anytype/.env
|
||||||
|
ExecStart=/opt/anytype/any-sync-bundle start-bundle
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=10
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now anytype
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
cleanup_lxc
|
||||||
@@ -29,13 +29,13 @@ $STD apt install -y \
|
|||||||
redis-server
|
redis-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="17" PG_MODULES="pgvector" setup_postgresql
|
PG_VERSION="16" PG_MODULES="pgvector" setup_postgresql
|
||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="22" setup_nodejs
|
||||||
RUBY_VERSION="3.4.4" setup_ruby
|
RUBY_VERSION="3.4.4" setup_ruby
|
||||||
|
|
||||||
msg_info "Configuring PostgreSQL for Discourse"
|
msg_info "Configuring PostgreSQL for Discourse"
|
||||||
DISCOURSE_DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
DISCOURSE_DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
PG_HBA=$(find /etc/postgresql -name pg_hba.conf 2>/dev/null | head -n1)
|
PG_HBA="/etc/postgresql/16/main/pg_hba.conf"
|
||||||
sed -i 's/^local\s\+all\s\+all\s\+peer$/local all all md5/' "$PG_HBA"
|
sed -i 's/^local\s\+all\s\+all\s\+peer$/local all all md5/' "$PG_HBA"
|
||||||
$STD systemctl restart postgresql
|
$STD systemctl restart postgresql
|
||||||
PG_DB_NAME="discourse" PG_DB_USER="discourse" PG_DB_PASS="$DISCOURSE_DB_PASS" setup_postgresql_db
|
PG_DB_NAME="discourse" PG_DB_USER="discourse" PG_DB_PASS="$DISCOURSE_DB_PASS" setup_postgresql_db
|
||||||
|
|||||||
88
install/gluetun-install.sh
Normal file
88
install/gluetun-install.sh
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
|
# Author: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/qdm12/gluetun
|
||||||
|
|
||||||
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt install -y \
|
||||||
|
openvpn \
|
||||||
|
wireguard-tools \
|
||||||
|
iptables
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Configuring iptables"
|
||||||
|
$STD update-alternatives --set iptables /usr/sbin/iptables-legacy
|
||||||
|
$STD update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
|
||||||
|
ln -sf /usr/sbin/openvpn /usr/sbin/openvpn2.6
|
||||||
|
msg_ok "Configured iptables"
|
||||||
|
|
||||||
|
setup_go
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "gluetun" "qdm12/gluetun" "tarball"
|
||||||
|
|
||||||
|
msg_info "Building Gluetun"
|
||||||
|
cd /opt/gluetun
|
||||||
|
$STD go mod download
|
||||||
|
CGO_ENABLED=0 $STD go build -trimpath -ldflags="-s -w" -o /usr/local/bin/gluetun ./cmd/gluetun/
|
||||||
|
msg_ok "Built Gluetun"
|
||||||
|
|
||||||
|
msg_info "Configuring Gluetun"
|
||||||
|
mkdir -p /opt/gluetun-data
|
||||||
|
ln -sf /opt/gluetun-data /gluetun
|
||||||
|
cat <<EOF >/opt/gluetun-data/.env
|
||||||
|
VPN_SERVICE_PROVIDER=custom
|
||||||
|
VPN_TYPE=openvpn
|
||||||
|
OPENVPN_CUSTOM_CONFIG=/opt/gluetun-data/custom.ovpn
|
||||||
|
OPENVPN_USER=
|
||||||
|
OPENVPN_PASSWORD=
|
||||||
|
HTTP_CONTROL_SERVER_ADDRESS=:8000
|
||||||
|
HTTPPROXY=off
|
||||||
|
SHADOWSOCKS=off
|
||||||
|
PPROF_ENABLED=no
|
||||||
|
FIREWALL_ENABLED_DISABLING_IT_SHOOTS_YOU_IN_YOUR_FOOT=on
|
||||||
|
HEALTH_SERVER_ADDRESS=127.0.0.1:9999
|
||||||
|
DNS_UPSTREAM_RESOLVERS=cloudflare
|
||||||
|
LOG_LEVEL=info
|
||||||
|
STORAGE_FILEPATH=/gluetun/servers.json
|
||||||
|
PUBLICIP_FILE=/gluetun/ip
|
||||||
|
VPN_PORT_FORWARDING_STATUS_FILE=/gluetun/forwarded_port
|
||||||
|
TZ=UTC
|
||||||
|
EOF
|
||||||
|
msg_ok "Configured Gluetun"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/gluetun.service
|
||||||
|
[Unit]
|
||||||
|
Description=Gluetun VPN Client
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=/opt/gluetun-data
|
||||||
|
EnvironmentFile=/opt/gluetun-data/.env
|
||||||
|
UnsetEnvironment=USER
|
||||||
|
ExecStart=/usr/local/bin/gluetun
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
|
AmbientCapabilities=CAP_NET_ADMIN
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now gluetun
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
cleanup_lxc
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: Matthew Stern (sternma) | MickLesk (CanbiZ)
|
# Author: Matthew Stern (sternma)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
# Source: https://github.com/dmunozv04/iSponsorBlockTV
|
# Source: https://github.com/dmunozv04/iSponsorBlockTV
|
||||||
|
|
||||||
@@ -13,14 +13,30 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV" "singlefile" "latest" "/opt/isponsorblocktv" "iSponsorBlockTV-*-linux"
|
INSTALL_DIR="/opt/isponsorblocktv"
|
||||||
|
DATA_DIR="/var/lib/isponsorblocktv"
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt install -y \
|
||||||
|
python3 \
|
||||||
|
python3-venv \
|
||||||
|
python3-pip
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "isponsorblocktv" "dmunozv04/iSponsorBlockTV"
|
||||||
|
|
||||||
msg_info "Setting up iSponsorBlockTV"
|
msg_info "Setting up iSponsorBlockTV"
|
||||||
install -d /var/lib/isponsorblocktv
|
$STD python3 -m venv "$INSTALL_DIR/venv"
|
||||||
|
$STD "$INSTALL_DIR/venv/bin/pip" install --upgrade pip
|
||||||
|
$STD "$INSTALL_DIR/venv/bin/pip" install "$INSTALL_DIR"
|
||||||
msg_ok "Set up iSponsorBlockTV"
|
msg_ok "Set up iSponsorBlockTV"
|
||||||
|
|
||||||
|
msg_info "Creating data directory"
|
||||||
|
install -d "$DATA_DIR"
|
||||||
|
msg_ok "Created data directory"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/isponsorblocktv.service
|
cat <<EOT >/etc/systemd/system/isponsorblocktv.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=iSponsorBlockTV
|
Description=iSponsorBlockTV
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
@@ -30,24 +46,26 @@ Wants=network-online.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=root
|
||||||
Group=root
|
Group=root
|
||||||
Environment=iSPBTV_data_dir=/var/lib/isponsorblocktv
|
WorkingDirectory=$INSTALL_DIR
|
||||||
ExecStart=/opt/isponsorblocktv/isponsorblocktv
|
Environment=iSPBTV_data_dir=$DATA_DIR
|
||||||
|
ExecStart=$INSTALL_DIR/venv/bin/iSponsorBlockTV
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOT
|
||||||
systemctl enable -q isponsorblocktv
|
systemctl enable -q --now isponsorblocktv
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
msg_info "Creating CLI wrapper"
|
msg_info "Creating CLI wrapper"
|
||||||
cat <<EOF >/usr/local/bin/iSponsorBlockTV
|
install -d /usr/local/bin
|
||||||
|
cat <<'EOT' >/usr/local/bin/iSponsorBlockTV
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
export iSPBTV_data_dir="/var/lib/isponsorblocktv"
|
export iSPBTV_data_dir="/var/lib/isponsorblocktv"
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
/opt/isponsorblocktv/isponsorblocktv "$@"
|
/opt/isponsorblocktv/venv/bin/iSponsorBlockTV "$@"
|
||||||
status=$?
|
status=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -58,11 +76,22 @@ case "${1:-}" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
exit $status
|
exit $status
|
||||||
EOF
|
EOT
|
||||||
chmod +x /usr/local/bin/iSponsorBlockTV
|
chmod +x /usr/local/bin/iSponsorBlockTV
|
||||||
ln -sf /usr/local/bin/iSponsorBlockTV /usr/bin/iSponsorBlockTV
|
ln -sf /usr/local/bin/iSponsorBlockTV /usr/bin/iSponsorBlockTV
|
||||||
msg_ok "Created CLI wrapper"
|
msg_ok "Created CLI wrapper"
|
||||||
|
|
||||||
|
msg_info "Setting default data dir for shells"
|
||||||
|
cat <<'EOT' >/etc/profile.d/isponsorblocktv.sh
|
||||||
|
export iSPBTV_data_dir="/var/lib/isponsorblocktv"
|
||||||
|
EOT
|
||||||
|
if ! grep -q '^iSPBTV_data_dir=' /etc/environment 2>/dev/null; then
|
||||||
|
cat <<'EOT' >>/etc/environment
|
||||||
|
iSPBTV_data_dir=/var/lib/isponsorblocktv
|
||||||
|
EOT
|
||||||
|
fi
|
||||||
|
msg_ok "Set default data dir for shells"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
cleanup_lxc
|
cleanup_lxc
|
||||||
|
|||||||
@@ -76,8 +76,6 @@ cat <<EOF >/opt/simplelogin/.env
|
|||||||
URL=http://${LOCAL_IP}
|
URL=http://${LOCAL_IP}
|
||||||
EMAIL_DOMAIN=example.com
|
EMAIL_DOMAIN=example.com
|
||||||
SUPPORT_EMAIL=support@example.com
|
SUPPORT_EMAIL=support@example.com
|
||||||
EMAIL_SERVERS_WITH_PRIORITY=[(10, "localhost.")]
|
|
||||||
POSTFIX_SERVER=localhost
|
|
||||||
DB_URI=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}
|
DB_URI=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}
|
||||||
FLASK_SECRET=${FLASK_SECRET}
|
FLASK_SECRET=${FLASK_SECRET}
|
||||||
DKIM_PRIVATE_KEY_PATH=/opt/simplelogin/dkim/dkim.private
|
DKIM_PRIVATE_KEY_PATH=/opt/simplelogin/dkim/dkim.private
|
||||||
|
|||||||
@@ -14,14 +14,27 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
|
||||||
PG_VERSION="17" PG_MODULES="cron" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
openssl
|
openssl \
|
||||||
|
postgresql-17-cron
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_DB_NAME="splitpro" PG_DB_USER="splitpro" PG_DB_EXTENSIONS="pg_cron" setup_postgresql_db
|
PG_DB_NAME="splitpro" PG_DB_USER="splitpro" setup_postgresql_db
|
||||||
|
|
||||||
|
msg_info "Setting up pg_cron"
|
||||||
|
sed -i "/^#shared_preload_libraries/s/^#//" /etc/postgresql/17/main/postgresql.conf
|
||||||
|
sed -i "/^shared_preload_libraries/s/''/pg_cron/" /etc/postgresql/17/main/postgresql.conf
|
||||||
|
systemctl restart postgresql
|
||||||
|
$STD sudo -u postgres psql -c "ALTER SYSTEM SET cron.database_name = 'splitpro'"
|
||||||
|
$STD sudo -u postgres psql -c "ALTER SYSTEM SET cron.timezone = 'UTC'"
|
||||||
|
systemctl restart postgresql
|
||||||
|
$STD sudo -u postgres psql -d splitpro -c "CREATE EXTENSION IF NOT EXISTS pg_cron"
|
||||||
|
$STD sudo -u postgres psql -d splitpro -c "GRANT USAGE ON SCHEMA cron TO splitpro"
|
||||||
|
$STD sudo -u postgres psql -d splitpro -c "GRANT ALL ON ALL TABLES IN SCHEMA cron TO splitpro"
|
||||||
|
msg_ok "Setup pg_cron complete"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "split-pro" "oss-apps/split-pro" "tarball" "latest" "/opt/split-pro"
|
fetch_and_deploy_gh_release "split-pro" "oss-apps/split-pro" "tarball" "latest" "/opt/split-pro"
|
||||||
|
|
||||||
|
|||||||
52
json/gluetun.json
Normal file
52
json/gluetun.json
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"name": "Gluetun",
|
||||||
|
"slug": "gluetun",
|
||||||
|
"categories": [
|
||||||
|
4
|
||||||
|
],
|
||||||
|
"date_created": "2026-03-10",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 8000,
|
||||||
|
"documentation": "https://github.com/qdm12/gluetun-wiki",
|
||||||
|
"config_path": "/opt/gluetun-data/.env",
|
||||||
|
"website": "https://github.com/qdm12/gluetun",
|
||||||
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/gluetun.webp",
|
||||||
|
"description": "Gluetun is a lightweight VPN client supporting multiple providers (Mullvad, NordVPN, PIA, ProtonVPN, Surfshark, etc.) with OpenVPN and WireGuard, built-in DNS over TLS, firewall kill switch, HTTP proxy, and Shadowsocks proxy.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/gluetun.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 2,
|
||||||
|
"ram": 2048,
|
||||||
|
"hdd": 8,
|
||||||
|
"os": "Debian",
|
||||||
|
"version": "13"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "You must configure your VPN provider credentials in /opt/gluetun-data/.env before the service will connect",
|
||||||
|
"type": "warning"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "TUN device support is required and enabled by default during container creation",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Port 8000 provides the HTTP control server API",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Supports 30+ VPN providers - see https://github.com/qdm12/gluetun-wiki for provider-specific setup",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -6366,24 +6366,8 @@ EOF
|
|||||||
# setup_postgresql # Uses distro package (recommended)
|
# setup_postgresql # Uses distro package (recommended)
|
||||||
# USE_PGDG_REPO=true setup_postgresql # Uses official PGDG repo
|
# USE_PGDG_REPO=true setup_postgresql # Uses official PGDG repo
|
||||||
# USE_PGDG_REPO=true PG_VERSION="17" setup_postgresql # Specific version from PGDG
|
# USE_PGDG_REPO=true PG_VERSION="17" setup_postgresql # Specific version from PGDG
|
||||||
# PG_VERSION="17" PG_MODULES="cron" setup_postgresql # With pg_cron module
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Internal helper: Configure shared_preload_libraries for pg_cron
|
|
||||||
_configure_pg_cron_preload() {
|
|
||||||
local modules="${1:-}"
|
|
||||||
[[ -z "$modules" ]] && return 0
|
|
||||||
if [[ ",$modules," == *",cron,"* ]]; then
|
|
||||||
local current_libs
|
|
||||||
current_libs=$(sudo -u postgres psql -tAc "SHOW shared_preload_libraries;" 2>/dev/null || echo "")
|
|
||||||
if [[ "$current_libs" != *"pg_cron"* ]]; then
|
|
||||||
local new_libs="${current_libs:+${current_libs},}pg_cron"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER SYSTEM SET shared_preload_libraries = '${new_libs}';"
|
|
||||||
$STD systemctl restart postgresql
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function setup_postgresql() {
|
function setup_postgresql() {
|
||||||
local PG_VERSION="${PG_VERSION:-16}"
|
local PG_VERSION="${PG_VERSION:-16}"
|
||||||
local PG_MODULES="${PG_MODULES:-}"
|
local PG_MODULES="${PG_MODULES:-}"
|
||||||
@@ -6422,7 +6406,6 @@ function setup_postgresql() {
|
|||||||
$STD apt install -y "postgresql-${CURRENT_PG_VERSION}-${module}" 2>/dev/null || true
|
$STD apt install -y "postgresql-${CURRENT_PG_VERSION}-${module}" 2>/dev/null || true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
_configure_pg_cron_preload "$PG_MODULES"
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -6458,7 +6441,6 @@ function setup_postgresql() {
|
|||||||
$STD apt install -y "postgresql-${INSTALLED_VERSION}-${module}" 2>/dev/null || true
|
$STD apt install -y "postgresql-${INSTALLED_VERSION}-${module}" 2>/dev/null || true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
_configure_pg_cron_preload "$PG_MODULES"
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -6480,7 +6462,6 @@ function setup_postgresql() {
|
|||||||
$STD apt install -y "postgresql-${PG_VERSION}-${module}" 2>/dev/null || true
|
$STD apt install -y "postgresql-${PG_VERSION}-${module}" 2>/dev/null || true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
_configure_pg_cron_preload "$PG_MODULES"
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -6599,7 +6580,6 @@ function setup_postgresql() {
|
|||||||
}
|
}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
_configure_pg_cron_preload "$PG_MODULES"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@@ -6618,7 +6598,6 @@ function setup_postgresql() {
|
|||||||
# PG_DB_NAME="immich" PG_DB_USER="immich" PG_DB_EXTENSIONS="pgvector" setup_postgresql_db
|
# PG_DB_NAME="immich" PG_DB_USER="immich" PG_DB_EXTENSIONS="pgvector" setup_postgresql_db
|
||||||
# PG_DB_NAME="ghostfolio" PG_DB_USER="ghostfolio" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
|
# PG_DB_NAME="ghostfolio" PG_DB_USER="ghostfolio" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
|
||||||
# PG_DB_NAME="adventurelog" PG_DB_USER="adventurelog" PG_DB_EXTENSIONS="postgis" setup_postgresql_db
|
# PG_DB_NAME="adventurelog" PG_DB_USER="adventurelog" PG_DB_EXTENSIONS="postgis" setup_postgresql_db
|
||||||
# PG_DB_NAME="splitpro" PG_DB_USER="splitpro" PG_DB_EXTENSIONS="pg_cron" setup_postgresql_db
|
|
||||||
#
|
#
|
||||||
# Variables:
|
# Variables:
|
||||||
# PG_DB_NAME - Database name (required)
|
# PG_DB_NAME - Database name (required)
|
||||||
@@ -6650,13 +6629,6 @@ function setup_postgresql_db() {
|
|||||||
$STD sudo -u postgres psql -c "CREATE ROLE $PG_DB_USER WITH LOGIN PASSWORD '$PG_DB_PASS';"
|
$STD sudo -u postgres psql -c "CREATE ROLE $PG_DB_USER WITH LOGIN PASSWORD '$PG_DB_PASS';"
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $PG_DB_NAME WITH OWNER $PG_DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
$STD sudo -u postgres psql -c "CREATE DATABASE $PG_DB_NAME WITH OWNER $PG_DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||||
|
|
||||||
# Configure pg_cron database BEFORE creating the extension (must be set before pg_cron loads)
|
|
||||||
if [[ -n "${PG_DB_EXTENSIONS:-}" ]] && [[ ",${PG_DB_EXTENSIONS//[[:space:]]/}," == *",pg_cron,"* ]]; then
|
|
||||||
$STD sudo -u postgres psql -c "ALTER SYSTEM SET cron.database_name = '${PG_DB_NAME}';"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER SYSTEM SET cron.timezone = 'UTC';"
|
|
||||||
$STD systemctl restart postgresql
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install extensions (comma-separated)
|
# Install extensions (comma-separated)
|
||||||
if [[ -n "${PG_DB_EXTENSIONS:-}" ]]; then
|
if [[ -n "${PG_DB_EXTENSIONS:-}" ]]; then
|
||||||
IFS=',' read -ra EXT_LIST <<<"${PG_DB_EXTENSIONS:-}"
|
IFS=',' read -ra EXT_LIST <<<"${PG_DB_EXTENSIONS:-}"
|
||||||
@@ -6666,12 +6638,6 @@ function setup_postgresql_db() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Grant pg_cron schema permissions to DB user
|
|
||||||
if [[ -n "${PG_DB_EXTENSIONS:-}" ]] && [[ ",${PG_DB_EXTENSIONS//[[:space:]]/}," == *",pg_cron,"* ]]; then
|
|
||||||
$STD sudo -u postgres psql -d "$PG_DB_NAME" -c "GRANT USAGE ON SCHEMA cron TO ${PG_DB_USER};"
|
|
||||||
$STD sudo -u postgres psql -d "$PG_DB_NAME" -c "GRANT ALL ON ALL TABLES IN SCHEMA cron TO ${PG_DB_USER};"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ALTER ROLE settings for Django/Rails compatibility (unless skipped)
|
# ALTER ROLE settings for Django/Rails compatibility (unless skipped)
|
||||||
if [[ "${PG_DB_SKIP_ALTER_ROLE:-}" != "true" ]]; then
|
if [[ "${PG_DB_SKIP_ALTER_ROLE:-}" != "true" ]]; then
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $PG_DB_USER SET client_encoding TO 'utf8';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $PG_DB_USER SET client_encoding TO 'utf8';"
|
||||||
@@ -8184,8 +8150,8 @@ function fetch_and_deploy_gl_release() {
|
|||||||
ensure_dependencies jq
|
ensure_dependencies jq
|
||||||
|
|
||||||
local repo_encoded
|
local repo_encoded
|
||||||
repo_encoded=$(python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1], safe=''))" "$repo" 2>/dev/null ||
|
repo_encoded=$(python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1], safe=''))" "$repo" 2>/dev/null \
|
||||||
echo "$repo" | sed 's|/|%2F|g')
|
|| echo "$repo" | sed 's|/|%2F|g')
|
||||||
|
|
||||||
local api_base="https://gitlab.com/api/v4/projects/$repo_encoded/releases"
|
local api_base="https://gitlab.com/api/v4/projects/$repo_encoded/releases"
|
||||||
local api_url
|
local api_url
|
||||||
@@ -8353,9 +8319,7 @@ function fetch_and_deploy_gl_release() {
|
|||||||
if [[ -n "$asset_pattern" ]]; then
|
if [[ -n "$asset_pattern" ]]; then
|
||||||
for u in $assets; do
|
for u in $assets; do
|
||||||
case "${u##*/}" in $asset_pattern)
|
case "${u##*/}" in $asset_pattern)
|
||||||
url_match="$u"
|
url_match="$u"; break ;;
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -8428,9 +8392,7 @@ function fetch_and_deploy_gl_release() {
|
|||||||
for u in $(_gl_asset_urls "$json"); do
|
for u in $(_gl_asset_urls "$json"); do
|
||||||
filename_candidate="${u##*/}"
|
filename_candidate="${u##*/}"
|
||||||
case "$filename_candidate" in $pattern)
|
case "$filename_candidate" in $pattern)
|
||||||
asset_url="$u"
|
asset_url="$u"; break ;;
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -8539,9 +8501,7 @@ function fetch_and_deploy_gl_release() {
|
|||||||
for u in $(_gl_asset_urls "$json"); do
|
for u in $(_gl_asset_urls "$json"); do
|
||||||
filename_candidate="${u##*/}"
|
filename_candidate="${u##*/}"
|
||||||
case "$filename_candidate" in $pattern)
|
case "$filename_candidate" in $pattern)
|
||||||
asset_url="$u"
|
asset_url="$u"; break ;;
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -8579,4 +8539,4 @@ function fetch_and_deploy_gl_release() {
|
|||||||
echo "$version" >"$version_file"
|
echo "$version" >"$version_file"
|
||||||
msg_ok "Deployed: $app ($version)"
|
msg_ok "Deployed: $app ($version)"
|
||||||
rm -rf "$tmpdir"
|
rm -rf "$tmpdir"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user