mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-02-22 20:51:10 +01:00
New Script: Zerotier Controller (#1928)
* add zerotier script * Update ct/zerotier-one.sh Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Update ct/zerotier-one.sh Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Update ct/zerotier-one.sh Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Update install/zerotier-one-install.sh Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Update install/zerotier-one-install.sh Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * remove sleep * improvements to install procedure * fixes --------- Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
This commit is contained in:
parent
43646a8e19
commit
a6f656eacf
57
ct/zerotier-one.sh
Normal file
57
ct/zerotier-one.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: tremor021
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
|
||||
# App Default Values
|
||||
APP="Zerotier-One"
|
||||
var_tags="networking"
|
||||
var_cpu="1"
|
||||
var_ram="512"
|
||||
var_disk="4"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
||||
# App Output & Base Settings
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /usr/sbin/zerotier-one ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop zerotier-one
|
||||
msg_ok "Stopping Service"
|
||||
msg_info "Updating ${APP}"
|
||||
apt-get update &>/dev/null
|
||||
apt-get -y upgrade
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start zerotier-one
|
||||
msg_ok "Started Service"
|
||||
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 IP:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:3443${CL}"
|
46
install/zerotier-one-install.sh
Normal file
46
install/zerotier-one-install.sh
Normal file
@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: tremor021
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
curl \
|
||||
mc \
|
||||
sudo
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up Zerotier-One"
|
||||
curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/main/doc/contact%40zerotier.com.gpg' | gpg --import && \
|
||||
if z="$(curl -s 'https://install.zerotier.com/' | gpg)"; then
|
||||
echo "$z" | sudo bash
|
||||
fi
|
||||
msg_ok "Setup Zerotier-One"
|
||||
|
||||
msg_info "Setting up UI"
|
||||
curl -O https://s3-us-west-1.amazonaws.com/key-networks/deb/ztncui/1/x86_64/ztncui_0.8.14_amd64.deb
|
||||
dpkg -i ztncui_0.8.14_amd64.deb
|
||||
sh -c "echo ZT_TOKEN=$(cat /var/lib/zerotier-one/authtoken.secret) > /opt/key-networks/ztncui/.env"
|
||||
echo HTTPS_PORT=3443 >> /opt/key-networks/ztncui/.env
|
||||
echo NODE_ENV=production >> /opt/key-networks/ztncui/.env
|
||||
chmod 400 /opt/key-networks/ztncui/.env
|
||||
chown ztncui:ztncui /opt/key-networks/ztncui/.env
|
||||
systemctl restart ztncui
|
||||
msg_ok "Done setting up UI."
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
34
json/zerotier-one.json
Normal file
34
json/zerotier-one.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "Zerotier-One",
|
||||
"slug": "zerotier-one",
|
||||
"categories": [
|
||||
4
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3443,
|
||||
"documentation": "https://https://docs.zerotier.com/",
|
||||
"website": "https://www.zerotier.com/",
|
||||
"logo": "https://www.zerotier.com/wp-content/uploads/2025/01/Logo-White.svg",
|
||||
"description": "ZeroTier is a secure network overlay that allows you to manage all of your network resources as if they were on the same LAN. The software-defined solution can be deployed in minutes from anywhere. No matter how many devices you need to connect, or where they are in the world, ZeroTier makes global networking simple.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/debian.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 512,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "admin",
|
||||
"password": "password"
|
||||
},
|
||||
"notes": []
|
||||
}
|
Loading…
Reference in New Issue
Block a user