formatting and remove core_deps

This commit is contained in:
CanbiZ 2025-03-26 15:18:43 +01:00
parent 58de772fdf
commit 7119077370

View File

@ -5,14 +5,13 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/openziti/ziti # Source: https://github.com/openziti/ziti
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color color
verb_ip6 verb_ip6
catch_errors catch_errors
setting_up_container setting_up_container
network_check network_check
update_os update_os
install_core_deps
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y gpg $STD apt-get install -y gpg
@ -21,7 +20,7 @@ msg_ok "Installed Dependencies"
msg_info "Installing openziti" msg_info "Installing openziti"
mkdir -p --mode=0755 /usr/share/keyrings mkdir -p --mode=0755 /usr/share/keyrings
curl -sSLf https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg curl -sSLf https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg
echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable jammy main" > /etc/apt/sources.list.d/openziti.list echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable jammy main" >/etc/apt/sources.list.d/openziti.list
$STD apt-get update $STD apt-get update
$STD apt-get install -y ziti-edge-tunnel $STD apt-get install -y ziti-edge-tunnel
sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openziti/bin/ziti-edge-tunnel run-host --verbose=${ZITI_VERBOSE} --identity-dir=${ZITI_IDENTITY_DIR}| } }' /usr/lib/systemd/system/ziti-edge-tunnel.service sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openziti/bin/ziti-edge-tunnel run-host --verbose=${ZITI_VERBOSE} --identity-dir=${ZITI_IDENTITY_DIR}| } }' /usr/lib/systemd/system/ziti-edge-tunnel.service
@ -30,14 +29,14 @@ msg_ok "Installed openziti"
read -r -p "Please paste an identity enrollment token(JTW)" prompt read -r -p "Please paste an identity enrollment token(JTW)" prompt
if [[ ${prompt} ]]; then if [[ ${prompt} ]]; then
msg_info "Adding identity" msg_info "Adding identity"
echo "${prompt}" > /opt/openziti/etc/identities/identity.jwt echo "${prompt}" >/opt/openziti/etc/identities/identity.jwt
chown ziti:ziti /opt/openziti/etc/identities/identity.jwt chown ziti:ziti /opt/openziti/etc/identities/identity.jwt
systemctl enable -q --now ziti-edge-tunnel systemctl enable -q --now ziti-edge-tunnel
msg_ok "Service Started" msg_ok "Service Started"
else else
systemctl enable -q ziti-edge-tunnel systemctl enable -q ziti-edge-tunnel
msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service" msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service"
fi fi
motd_ssh motd_ssh