Commit Graph
49 Commits
Author SHA1 Message Date
CanbiZ (MickLesk) de356fa8b6 set gawk 2026-03-25 08:51:06 +01:00
1c3c223e51 Turnkey: modernize turnkey.sh with shared libraries (#13242)
* refactor(turnkey): modernize turnkey.sh with shared libraries and telemetry

- Source core.func, error_handler.func, api.func instead of custom error/msg functions
- Replace custom error_exit/warn/info/msg with msg_info/msg_ok/msg_error/msg_warn
- Upgrade validate_container_id to cluster-aware (pvesh + all-node config check)
- Add diagnostics_check() and telemetry (post_to_api / post_update_to_api)
- Add pve_check, shell_check, root_check for environment validation
- Use proper EXIT trap for cleanup (destroy container on error, restart monitor)
- Improve quoting throughout (PCT_OPTIONS as array, quoted variables)
- Secure credentials file with chmod 600
- Use exit_script for user cancellations (consistent with other scripts)

* fix(turnkey): replace diagnostics_check with inline config read

diagnostics_check() is defined in build.func which is not sourced.
Read the diagnostics config file directly instead — respects existing
user preference without prompting (turnkey has no settings menu).

* bump hardcoded names to dynamic list

* Preserve telemetry type and report failures

Respect a pre-set TELEMETRY_TYPE in misc/api.func and use it in the API payload instead of the hardcoded "lxc". In turnkey/turnkey.sh, set TELEMETRY_TYPE="turnkey" for turnkey installs and enhance turnkey_cleanup() to report failed installs to telemetry (calls post_update_to_api "failed" with the exit code when POST_TO_API_DONE is true and POST_UPDATE_DONE is not), then destroy the failed container. These changes ensure correct telemetry type propagation and that failed turnkey deployments are reported.

---------

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
2026-03-24 15:54:01 +01:00
CanbiZ (MickLesk)andGitHub 1ccf90cb27 core: validate container ID before pct create to prevent failures (#10729)
* feat: validate container ID before pct create to prevent failures

Add validation to ensure container IDs are not already in use before attempting to create containers. This prevents pct create failures when an ID is already assigned to a VM/LXC or used in LVM volumes.

Changes:
- Add validate_container_id() and get_valid_container_id() functions to build.func
- Validate ID in base_settings() for default installation method
- Validate ID in advanced_settings() dialog with user prompt for next available ID
- Add validation to turnkey.sh with interactive dialog
- Add validation to all-templates.sh with automatic ID correction

Checks performed:
- Container config file existence (/etc/pve/lxc/*.conf)
- VM config file existence (/etc/pve/qemu-server/*.conf)
- LVM logical volume usage

Fixes issue where container creation would fail if the suggested/chosen ID was already in use.

* feat: validate container ID before pct create to prevent failures

Add validation to ensure container IDs are not already in use before attempting to create containers. This prevents pct create failures when an ID is already assigned to a VM/LXC or used in LVM volumes.

Changes:
- Add validate_container_id() and get_valid_container_id() functions to build.func
- Validate ID in base_settings() for default installation method
- Validate ID in advanced_settings() dialog with user prompt for next available ID
- Add validation to turnkey.sh with interactive dialog
- Add validation to all-templates.sh with automatic ID correction

Checks performed:
- Container config file existence (/etc/pve/lxc/*.conf)
- VM config file existence (/etc/pve/qemu-server/*.conf)
- LVM logical volume usage

Fixes issue where container creation would fail if the suggested/chosen ID was already in use.

* Update turnkey.sh

* Update build.func
2026-01-12 14:04:28 +01:00
TobiasandGitHub c1fe8b91b4 chore: bump copyright to 2026 - happy new year (#10585)
* chore: bump copyright to 2026 - happy new year

* fix

* meilisearch fix source url

* livebook: fix space

* fix source cmd

* fix source cmd
2026-01-06 13:28:12 +01:00
masterofrpmandGitHub 7d6806e1fb turnkey: add hostname & Fix TUN access (#6512)
* Update turnkey.sh

Allow choosing container ID & add tun device access to the container. Also notify user that the credentials are stored in a file on the host machine.

* Update turnkey.sh

fixed how tun access is added by instead modifying the conf file of the container. Also added filtering to only add tun access if required. A few other minor verbiage changes/corrections.

* Update turnkey.sh

Corrected variable expansion.
2025-08-04 18:37:11 +02:00
Mateusz HaligowskiandGitHub 69d9394840 (turnkey) Add OpenLDAP (#5305) 2025-06-20 07:40:51 +02:00
Jordan PattonandGitHub 85a5bf2a55 updated word order in several scripts (#3921) 2025-04-17 08:49:55 +02:00
30e8cbf5b4 [core] remove unneeded vars from shellcheck (#3899)
* remove unneeded wars

* Update alpine-wireguard-install.sh

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2025-04-15 15:20:46 +02:00
8c051b8186 Replace wget with curl -fsSL, normalize downloads, and prep for IPv6 (#3455)
* Initial Call, Switch from curl -s to curl -fsSL and wget to curl -fssL

* more switches

* switch vms

* more curls

* More curls

* more

* more

* more changes

* more

* prepare ipv6 calls

* change frontend to ipv6

* Formatting

* Fromatting

* Update gomft.sh

* Update gomft-install.sh

* Update ersatztv.sh

* Update build.func

---------

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
2025-04-01 10:25:46 +02:00
CanbiZandGitHub 15f04d525d Happy new Year! Update Copyright to 2025 (#1150) 2025-01-01 13:37:29 +01:00
CanbiZ a4a1821822 Changed all dependencies to the community project 2024-11-02 08:48:05 +01:00
ttecksterandGitHub 30c53d6958 update year to 2024 2024-01-01 12:13:05 -05:00
ttecksterandGitHub cb312d1f5b Update turnkey.sh
tweak
2023-12-05 05:41:51 -05:00
ttecksterandGitHub 1290e91450 Update turnkey.sh
tweak
2023-12-04 05:56:44 -05:00
ttecksterandGitHub b6fdaa624e Update turnkey.sh
add BookStack
2023-11-26 11:32:42 -05:00
ttecksterandGitHub 7851ed6b70 Update turnkey.sh
fixes https://github.com/tteck/Proxmox/issues/2055
2023-11-14 09:36:00 -05:00
ttecksterandGitHub 5d40a203e6 Update turnkey.sh
change whiptail variables
2023-10-06 23:53:18 -04:00
ttecksterandGitHub e26aeb25a8 Update turnkey.sh
add Ansible
2023-09-23 15:03:35 -04:00
ttecksterandGitHub a72c411497 Update turnkey.sh
add appliances
2023-09-18 19:53:44 -04:00
ttecksterandGitHub 28b290c4e5 Update turnkey.sh
add Invoice Ninja
2023-09-15 17:44:16 -04:00
ttecksterandGitHub 63dbfcdec4 Remove unnecessary turnkey container files. 2023-09-14 23:16:54 -04:00
ttecksterandGitHub d48b458969 Create turnkey.sh
This will allow for the creation of one of the many TurnKey LXC Containers.
2023-09-14 22:24:08 -04:00
ttecksterandGitHub c10678e251 Update TurnKey scripts
Disable the 'exit on error' behavior while checking for an IP.
2023-09-10 17:05:03 -04:00
ttecksterandGitHub 3b1560fa63 An alternative method for acquiring the IP address in the TurnKey scripts. 2023-09-10 16:07:40 -04:00
ttecksterandGitHub c64c8d5adf Update turnkey-gameserver.sh
remove test MAC
2023-09-10 15:57:03 -04:00
ttecksterandGitHub 761f05ca65 Create turnkey-gameserver.sh 2023-09-10 09:43:31 -04:00
ttecksterandGitHub 6fae1fc557 add backtitle 2023-09-09 05:13:17 -04:00
ttecksterandGitHub 57b320f664 Create turnkey-mediaserver.sh 2023-09-01 05:46:11 -04:00
ttecksterandGitHub 9c44b26add turnkey scripts code refactoring 2023-08-31 14:21:31 -04:00
ttecksterandGitHub 55a2fa2ac8 Create turnkey-openvpn.sh 2023-08-31 11:14:42 -04:00
ttecksterandGitHub 21ad01113b testing new get ip code in turnkey-observium.sh 2023-08-31 08:48:11 -04:00
ttecksterandGitHub 0e08ce5c9c Create turnkey-zoneminder.sh 2023-08-31 06:57:01 -04:00
ttecksterandGitHub d5ea1be5a6 Update turnkey-fileserver.sh
revert test
2023-08-30 18:24:58 -04:00
ttecksterandGitHub a00a0a0ef3 Update turnkey-fileserver.sh
test
2023-08-30 16:54:55 -04:00
ttecksterandGitHub 19a33639dc tweak turnkey scripts 2023-08-30 16:00:13 -04:00
ttecksterandGitHub 4b076f8c19 tweak turnkey scripts 2023-08-30 14:04:52 -04:00
ttecksterandGitHub 0af714731d Create turnkey-gitea.sh 2023-08-30 05:57:45 -04:00
ttecksterandGitHub dd2202695f tweak turnkey scripts 2023-08-30 05:33:03 -04:00
ttecksterandGitHub 4f40e11057 Create turnkey-torrentserver.sh 2023-08-29 20:33:41 -04:00
ttecksterandGitHub 604c20df17 turnkey code refactoring 2023-08-29 19:17:30 -04:00
ttecksterandGitHub 8feaf1ef84 Create turnkey-nextcloud.sh 2023-08-29 17:01:59 -04:00
ttecksterandGitHub 7d87c278be Create turnkey-observium.sh 2023-08-29 16:07:38 -04:00
ttecksterandGitHub ab4afab8bc Create turnkey-wordpress.sh 2023-08-29 15:39:34 -04:00
ttecksterandGitHub 071984d133 tweaks 2023-08-29 15:00:03 -04:00
ttecksterandGitHub 12fec28eb7 Create turnkey-owncloud.sh 2023-08-29 14:02:49 -04:00
ttecksterandGitHub e1953beca4 Update turnkey-core.sh
adjust resources
2023-08-29 09:46:16 -04:00
ttecksterandGitHub 3c0e25adeb Create turnkey-core.sh 2023-08-29 09:43:15 -04:00
ttecksterandGitHub be78b108f2 Create turnkey-gitlab.sh 2023-08-29 09:36:44 -04:00
ttecksterandGitHub 4bf7a1f743 create turnkey folder 2023-08-29 09:34:47 -04:00