forked from forkanization/Proxmox-arm64
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
@@ -27,7 +27,7 @@ msg_info "Installing Nginx"
|
||||
wget -qO- https://nginx.org/keys/nginx_signing.key | gpg --dearmor >/usr/share/keyrings/nginx-archive-keyring.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian $(lsb_release -cs) nginx" >/etc/apt/sources.list.d/nginx.list
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y nginx
|
||||
$STD apt-get install -y nginx=1.26.1*
|
||||
msg_ok "Installed Nginx"
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/bunkerity/bunkerweb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
@@ -76,7 +76,7 @@ msg_ok "Installed Change Detection"
|
||||
msg_info "Installing Browserless & Playwright"
|
||||
mkdir /opt/browserless
|
||||
$STD python3 -m pip install playwright
|
||||
$STD git clone -b v1 https://github.com/browserless/chrome /opt/browserless
|
||||
$STD git clone https://github.com/browserless/chrome /opt/browserless
|
||||
$STD npm install --prefix /opt/browserless
|
||||
$STD npm run build --prefix /opt/browserless
|
||||
$STD npm prune production --prefix /opt/browserless
|
||||
@@ -126,8 +126,8 @@ Wants=browserless.service
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/changedetection
|
||||
Environment="WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub"
|
||||
Environment="PLAYWRIGHT_DRIVER_URL=ws://127.0.0.1:3000/?stealth=1&--disable-web-security=true"
|
||||
Environment=WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
|
||||
Environment=PLAYWRIGHT_DRIVER_URL=ws://browserless-chrome:3000/chrome?launch={"defaultViewport":{"height":720,"width":1280},"headless":false,"stealth":true}&blockAds=true
|
||||
ExecStart=changedetection.io -d /opt/changedetection -p 5000
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -19,6 +19,7 @@ $STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
$STD apt-get install -y wget
|
||||
$STD apt-get install -y openssh-server
|
||||
$STD apt-get install -y rsync
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Azul Zulu"
|
||||
@@ -29,11 +30,14 @@ $STD apt-get update
|
||||
$STD apt-get -y install zulu17-jdk
|
||||
msg_ok "Installed Azul Zulu"
|
||||
|
||||
msg_info "Installing CommaFeed"
|
||||
mkdir /opt/commafeed && cd /opt/commafeed
|
||||
wget -q https://github.com/Athou/commafeed/releases/latest/download/commafeed.jar
|
||||
wget -q https://github.com/Athou/commafeed/releases/latest/download/config.yml.example -O config.yml
|
||||
msg_ok "Installed CommaFeed"
|
||||
RELEASE=$(curl -sL https://api.github.com/repos/Athou/commafeed/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
|
||||
msg_info "Installing CommaFeed ${RELEASE}"
|
||||
mkdir /opt/commafeed
|
||||
wget -q https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip
|
||||
unzip -q commafeed-${RELEASE}-h2-jvm.zip
|
||||
mv commafeed-${RELEASE}-h2/* /opt/commafeed/
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed CommaFeed ${RELEASE}"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/commafeed.service
|
||||
@@ -42,7 +46,7 @@ Description=CommaFeed Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/java -Djava.net.preferIPv4Stack=true -jar /opt/commafeed/commafeed.jar server /opt/commafeed/config.yml
|
||||
ExecStart=java -jar quarkus-run.jar
|
||||
WorkingDirectory=/opt/commafeed/
|
||||
Restart=always
|
||||
|
||||
@@ -56,7 +60,7 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf zulu-repo_1.0.0-3_all.deb
|
||||
rm -rf commafeed-${RELEASE}-h2 commafeed-${RELEASE}-h2-jvm.zip zulu-repo_1.0.0-3_all.deb
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
||||
@@ -171,17 +171,16 @@ msg_ok "Installed Coral Object Detection Model"
|
||||
|
||||
msg_info "Building Nginx with Custom Modules"
|
||||
$STD /opt/frigate/docker/main/build_nginx.sh
|
||||
#sed -i 's/exec nginx/exec \/usr\/local\/nginx\/sbin\/nginx/g' /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run
|
||||
sed -e '/s6-notifyoncheck/ s/^#*/#/' -i /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run
|
||||
sed -i 's/error_log \/dev\/stdout warn\;/error_log \/dev\/shm\/logs\/nginx\/current warn\;/' /usr/local/nginx/conf/nginx.conf
|
||||
sed -i 's/access_log \/dev\/stdout main\;/access_log \/dev\/shm\/logs\/nginx\/current main\;/' /usr/local/nginx/conf/nginx.conf
|
||||
ln -svf /usr/local/nginx/sbin/nginx /usr/local/bin/nginx
|
||||
ln -sf /usr/local/nginx/sbin/nginx /usr/local/bin/nginx
|
||||
msg_ok "Built Nginx"
|
||||
|
||||
msg_info "Installing Tempio"
|
||||
sed -i 's|/rootfs/usr/local|/usr/local|g' /opt/frigate/docker/main/install_tempio.sh
|
||||
$STD /opt/frigate/docker/main/install_tempio.sh
|
||||
ln -svf /usr/local/tempio/bin/tempio /usr/local/bin/tempio
|
||||
ln -sf /usr/local/tempio/bin/tempio /usr/local/bin/tempio
|
||||
msg_ok "Installed Tempio"
|
||||
|
||||
msg_info "Creating Services"
|
||||
@@ -211,8 +210,7 @@ Restart=always
|
||||
RestartSec=1
|
||||
User=root
|
||||
ExecStartPre=+rm /dev/shm/logs/go2rtc/current
|
||||
ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run
|
||||
#ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '"
|
||||
ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/go2rtc/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '"
|
||||
StandardOutput=file:/dev/shm/logs/go2rtc/current
|
||||
StandardError=file:/dev/shm/logs/go2rtc/current
|
||||
|
||||
@@ -234,8 +232,7 @@ Restart=always
|
||||
RestartSec=1
|
||||
User=root
|
||||
ExecStartPre=+rm /dev/shm/logs/frigate/current
|
||||
ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run
|
||||
#ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '"
|
||||
ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/frigate/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '"
|
||||
StandardOutput=file:/dev/shm/logs/frigate/current
|
||||
StandardError=file:/dev/shm/logs/frigate/current
|
||||
|
||||
@@ -257,7 +254,6 @@ Restart=always
|
||||
RestartSec=1
|
||||
User=root
|
||||
ExecStartPre=+rm /dev/shm/logs/nginx/current
|
||||
#ExecStart=bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run
|
||||
ExecStart=/bin/bash -c "bash /opt/frigate/docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/run 2> >(/usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S ' >&2) | /usr/bin/ts '%%Y-%%m-%%d %%H:%%M:%%.S '"
|
||||
StandardOutput=file:/dev/shm/logs/nginx/current
|
||||
StandardError=file:/dev/shm/logs/nginx/current
|
||||
|
||||
@@ -14,19 +14,13 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies (Patience)"
|
||||
$STD apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
unzip \
|
||||
curl \
|
||||
sudo \
|
||||
git \
|
||||
make \
|
||||
gnupg \
|
||||
ca-certificates \
|
||||
mc \
|
||||
wget \
|
||||
openssh-server
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y curl
|
||||
$STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
$STD apt-get install -y gpg
|
||||
$STD apt-get install -y wget
|
||||
$STD apt-get install -y openssh-server
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
@@ -41,15 +35,8 @@ $STD apt-get install -y nodejs
|
||||
msg_ok "Installed Node.js"
|
||||
|
||||
msg_info "Install Matterbridge"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/Luligu/matterbridge/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q "https://github.com/Luligu/matterbridge/archive/refs/tags/${RELEASE}.zip"
|
||||
unzip -q ${RELEASE}.zip
|
||||
mv matterbridge-${RELEASE} /opt/matterbridge
|
||||
rm -R ${RELEASE}.zip
|
||||
cd /opt/matterbridge
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
mkdir -p /root/Matterbridge
|
||||
$STD npm install -g matterbridge
|
||||
msg_ok "Installed Matterbridge"
|
||||
|
||||
msg_info "Creating Service"
|
||||
@@ -60,16 +47,13 @@ After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/npm run start:bridge
|
||||
WorkingDirectory=/opt/matterbridge
|
||||
ExecStart=matterbridge -bridge -service
|
||||
WorkingDirectory=/root/Matterbridge
|
||||
StandardOutput=inherit
|
||||
StandardError=inherit
|
||||
Restart=always
|
||||
RestartSec=10s
|
||||
TimeoutStopSec=30s
|
||||
User=root
|
||||
Environment=PATH=/usr/bin:/usr/local/bin:/opt/matterbridge/bin
|
||||
Environment=NODE_ENV=production
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -17,31 +17,48 @@ msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y curl
|
||||
$STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
$STD apt-get install -y gunicorn
|
||||
$STD apt-get install -y git
|
||||
$STD apt-get install -y wget
|
||||
$STD apt-get install -y openssh-server
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing WireGuard (using pivpn.io)"
|
||||
OPTIONS_PATH='/options.conf'
|
||||
cat >$OPTIONS_PATH <<EOF
|
||||
IPv4dev=eth0
|
||||
install_user=root
|
||||
VPN=wireguard
|
||||
pivpnNET=$(printf "10.%d.%d.0" $((RANDOM % 256)) $((RANDOM % 256)))
|
||||
subnetClass=24
|
||||
ALLOWED_IPS="0.0.0.0/0, ::0/0"
|
||||
pivpnMTU=1420
|
||||
pivpnPORT=51820
|
||||
pivpnDNS1=1.1.1.1
|
||||
pivpnDNS2=8.8.8.8
|
||||
pivpnHOST=
|
||||
pivpnPERSISTENTKEEPALIVE=25
|
||||
UNATTUPG=1
|
||||
EOF
|
||||
$STD bash <(curl -fsSL https://install.pivpn.io) --unattended options.conf
|
||||
msg_info "Installing WireGuard"
|
||||
$STD apt-get install -y wireguard wireguard-tools net-tools iptables
|
||||
msg_ok "Installed WireGuard"
|
||||
|
||||
msg_info "Installing WGDashboard"
|
||||
git clone -q https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard
|
||||
cd /etc/wgdashboard/src
|
||||
chmod u+x wgd.sh
|
||||
$STD ./wgd.sh install
|
||||
echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf
|
||||
$STD sysctl -p /etc/sysctl.conf
|
||||
msg_ok "Installed WGDashboard"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/wg-dashboard.service
|
||||
[Unit]
|
||||
After=syslog.target network-online.target
|
||||
Wants=wg-quick.target
|
||||
ConditionPathIsDirectory=/etc/wireguard
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/etc/wgdashboard/src/gunicorn.pid
|
||||
WorkingDirectory=/etc/wgdashboard/src
|
||||
ExecStart=/etc/wgdashboard/src/wgd.sh start
|
||||
ExecStop=/etc/wgdashboard/src/wgd.sh stop
|
||||
ExecReload=/etc/wgdashboard/src/wgd.sh restart
|
||||
TimeoutSec=120
|
||||
PrivateTmp=yes
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now wg-dashboard.service
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
|
||||
Reference in New Issue
Block a user