mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-16 17:46:10 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa6109525b |
@@ -51,6 +51,7 @@ function update_script() {
|
||||
mkdir -p /opt/networkoptimizer/publish/tools
|
||||
cd /opt/networkoptimizer/src/uwnspeedtest
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "-s -w" -o /opt/networkoptimizer/publish/tools/uwnspeedtest-linux-arm64 .
|
||||
[[ "$(arch_resolve)" != "arm64" ]] && CGO_ENABLED=0 GOOS=linux GOARCH="$(arch_resolve)" $STD go build -trimpath -ldflags "-s -w" -o "/opt/networkoptimizer/publish/tools/uwnspeedtest-linux-$(arch_resolve)" .
|
||||
msg_ok "Rebuilt NetworkOptimizer"
|
||||
|
||||
msg_info "Starting Service"
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.nocodb.com/ | Github: https://github.com/nocodb/nocodb
|
||||
|
||||
APP="NocoDB"
|
||||
var_tags="${var_tags:-noCode}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
#RELEASE="0.301.1"
|
||||
if [[ ! -f /etc/systemd/system/nocodb.service ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
#if check_for_gh_release "nocodb" "nocodb/nocodb" "${RELEASE}"; then
|
||||
if check_for_gh_release "nocodb" "nocodb/nocodb"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop nocodb
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-$(arch_resolve "x64" "arm64")"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start nocodb
|
||||
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 "${GATEWAY}${BGN}http://${IP}:8080/dashboard${CL}"
|
||||
@@ -42,11 +42,12 @@ $STD dotnet publish src/NetworkOptimizer.Web -c Release -r "$RID" --self-contain
|
||||
chmod +x /opt/networkoptimizer/publish/NetworkOptimizer.Web
|
||||
msg_ok "Built NetworkOptimizer"
|
||||
|
||||
msg_info "Building Gateway Speed Test Binary"
|
||||
msg_info "Building Speed Test Binaries"
|
||||
mkdir -p /opt/networkoptimizer/publish/tools
|
||||
cd /opt/networkoptimizer/src/uwnspeedtest
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "-s -w" -o /opt/networkoptimizer/publish/tools/uwnspeedtest-linux-arm64 .
|
||||
msg_ok "Built Gateway Speed Test Binary"
|
||||
[[ "$(arch_resolve)" != "arm64" ]] && CGO_ENABLED=0 GOOS=linux GOARCH="$(arch_resolve)" $STD go build -trimpath -ldflags "-s -w" -o "/opt/networkoptimizer/publish/tools/uwnspeedtest-linux-$(arch_resolve)" .
|
||||
msg_ok "Built Speed Test Binaries"
|
||||
|
||||
msg_info "Configuring NetworkOptimizer"
|
||||
cat <<EOF >/opt/networkoptimizer/networkoptimizer.env
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.nocodb.com/ | Github: https://github.com/nocodb/nocodb
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "nocodb" "nocodb/nocodb" "singlefile" "latest" "/opt/nocodb/" "Noco-linux-$(arch_resolve "x64" "arm64")"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/nocodb.service
|
||||
[Unit]
|
||||
Description=nocodb
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=root
|
||||
WorkingDirectory=/opt/nocodb
|
||||
ExecStart=/opt/nocodb/./nocodb
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now nocodb
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user