Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
asylumexp committed Aug 22, 2024
2 parents 858e58d + 561419f commit 553e514
Show file tree
Hide file tree
Showing 12 changed files with 112 additions and 176 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ Be cautious of copycat or coat-tailing sites that exploit the project's populari

- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.

## 2024-08-21

### Changed

- **WireGuard LXC** [(Commit)](https://github.com/tteck/Proxmox/commit/723365a79df7cc0fd29b1af8f7ef200a7e0921b1)
- Refactor Code
- Breaking Change

## 2024-08-19

### Changed

- **CommaFeed LXC** [(Commit)](https://github.com/tteck/Proxmox/commit/0a33d1739ec3a49011411929bd46a260e92e99f9)
- Refactor Code
- Breaking Change

## 2024-08-06

### Changed
Expand Down
2 changes: 1 addition & 1 deletion ct/alpine-vaultwarden.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function update_script() {
header_info
case $CHOICE in
1)
apk update && apk upgrade
apk update && apk upgrade && rc-service vaultwarden restart -q
exit
;;
2)
Expand Down
2 changes: 1 addition & 1 deletion ct/bunkerweb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Pin: version ${RELEASE}
Pin-Priority: 1001
EOF
apt-get update
apt-get install nginx -y
apt-get install -y nginx=1.26.1*
apt-get install -y bunkerweb=${RELEASE}
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
Expand Down
30 changes: 19 additions & 11 deletions ct/commafeed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,27 @@ function default_settings() {
function update_script() {
header_info
if [[ ! -d /opt/commafeed ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Stopping CommaFeed"
systemctl stop commafeed
msg_ok "Stopped CommaFeed"
RELEASE=$(curl -sL https://api.github.com/repos/Athou/commafeed/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping ${APP}"
systemctl stop commafeed
msg_ok "Stopped ${APP}"

msg_info "Updating CommaFeed"
cd /opt/commafeed
rm commafeed.jar
wget -q https://github.com/Athou/commafeed/releases/latest/download/commafeed.jar
msg_ok "Updated CommaFeed"
msg_info "Updating ${APP} to ${RELEASE}"
wget -q https://github.com/Athou/commafeed/releases/download/${RELEASE}/commafeed-${RELEASE}-h2-jvm.zip
unzip -q commafeed-${RELEASE}-h2-jvm.zip
rsync -a --exclude 'data/' commafeed-${RELEASE}-h2/ /opt/commafeed/
rm -rf commafeed-${RELEASE}-h2 commafeed-${RELEASE}-h2-jvm.zip
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"

msg_info "Starting CommaFeed"
systemctl start commafeed
msg_ok "Update Completed Successfully"
msg_info "Starting ${APP}"
systemctl start commafeed
msg_ok "Started ${APP}"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
}

Expand Down
33 changes: 2 additions & 31 deletions ct/matterbridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,37 +54,8 @@ function default_settings() {

function update_script() {
header_info
if [[ ! -d /opt/matterbridge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi

RELEASE=$(curl -s https://api.github.com/repos/Luligu/matterbridge/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping ${APP} Service"
systemctl stop matterbridge
msg_ok "Stopped ${APP} Service"

msg_info "Updating ${APP} to ${RELEASE}"
cd /opt/matterbridge
wget -q "https://github.com/Luligu/matterbridge/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
mv matterbridge-${RELEASE} /opt/matterbridge
cd /opt/matterbridge
npm ci >/dev/null 2>&1
npm run build >/dev/null 2>&1
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"

msg_info "Cleaning up"
rm /opt/${RELEASE}.zip
msg_ok "Cleaned"

msg_info "Starting ${APP} Service"
systemctl start matterbridge
sleep 1
msg_ok "Started ${APP} Service"
msg_ok "Updated Successfully!\n"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
if [[ ! -d /root/Matterbridge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "Update via the Matterbridge UI"
exit
}

Expand Down
74 changes: 7 additions & 67 deletions ct/wireguard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ EOF
header_info
echo -e "Loading..."
APP="Wireguard"
var_disk="2"
var_disk="4"
var_cpu="1"
var_ram="512"
var_os="ubuntu"
var_version="20.04"
var_os="debian"
var_version="12"
variables
color
catch_errors
Expand Down Expand Up @@ -53,75 +53,15 @@ function default_settings() {
}

function update_script() {
if [[ ! -d /etc/pivpn/wireguard ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 2 \
"1" "Update ${APP} LXC" ON \
"2" "Install WGDashboard" OFF \
3>&1 1>&2 2>&3)
header_info
if [ "$UPD" == "1" ]; then
msg_info "Updating ${APP} LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
msg_ok "Updated ${APP} LXC"
exit
fi
if [ "$UPD" == "2" ]; then
if [[ -f /etc/systemd/system/wg-dashboard.service ]]; then
cd /etc/wgdashboard/src
chmod u+x wgd.sh
./wgd.sh update
msg_ok "Updated Successfully"
exit
fi
IP=$(hostname -I | awk '{print $1}')
msg_info "Installing Python3-pip"
apt-get install -y python3-pip &>/dev/null
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
pip install flask &>/dev/null
pip install ifcfg &>/dev/null
pip install flask_qrcode &>/dev/null
pip install icmplib &>/dev/null
msg_ok "Installed Python3-pip"

msg_info "Installing WGDashboard"
WGDREL=$(curl -s https://api.github.com/repos/donaldzou/WGDashboard/releases/latest |
grep "tag_name" |
awk '{print substr($2, 2, length($2)-3) }')

git clone -b ${WGDREL} https://github.com/donaldzou/WGDashboard.git /etc/wgdashboard &>/dev/null
cd /etc/wgdashboard/src
chmod u+x wgd.sh
./wgd.sh install &>/dev/null
chmod -R 755 /etc/wireguard
msg_ok "Installed WGDashboard"

msg_info "Creating Service"
service_path="/etc/systemd/system/wg-dashboard.service"
echo "[Unit]
After=systemd-networkd.service
[Service]
WorkingDirectory=/etc/wgdashboard/src
ExecStart=/usr/bin/python3 /etc/wgdashboard/src/dashboard.py
Restart=always
[Install]
WantedBy=default.target" >$service_path
chmod 664 /etc/systemd/system/wg-dashboard.service
systemctl daemon-reload
systemctl enable wg-dashboard.service &>/dev/null
systemctl start wg-dashboard.service &>/dev/null
msg_ok "Created Service"
echo -e "WGDashboard should be reachable by going to the following URL.
${BL}http://${IP}:10086${CL} admin|admin \n"
if [[ ! -d /etc/wireguard ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "Update WireGuard via apt"
exit
fi
}

start
build_container
description

msg_ok "Completed Successfully!\n"
echo -e "WGDashboard should be reachable by going to the following URL.
${BL}http://${IP}:10086${CL} admin|admin \n"
2 changes: 1 addition & 1 deletion install/bunkerweb-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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) }')
Expand Down
6 changes: 3 additions & 3 deletions install/changedetection-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 11 additions & 7 deletions install/commafeed-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
12 changes: 4 additions & 8 deletions install/frigate-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit 553e514

Please sign in to comment.