Skip to content

Remove commercial modules & add verbose install #760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vsc55
Copy link

@vsc55 vsc55 commented Jul 27, 2025

✍️ Description

  • Added option to remove commercial modules
  • Added option to update system and modules
  • Added verbose mode for better debugging or to see what's going on behind the scenes

🔗 Related PR / Issue

Link: community-scripts/ProxmoxVE#6181

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)
  • No hardcoded credentials

📋 Additional Information (optional)

    ______               ____  ____ _  __
   / ____/_______  ___  / __ \/ __ ) |/ /
  / /_  / ___/ _ \/ _ \/ /_/ / __  |   /
 / __/ / /  /  __/  __/ ____/ /_/ /   |
/_/   /_/   \___/\___/_/   /_____/_/|_|

  ⚙️  Using Default Settings on node pve01
  🆔  Container ID: 159
  🖥️  Operating System: debian (12)
  📦  Container Type: Unprivileged
  💾  Disk Size: 10 GB
  🧠  CPU Cores: 2
  🛠️  RAM Size: 2048 MiB
  🚀  Creating a FreePBX LXC using the above default settings

  ✔️   Validated Storage (rootdir / vztmpl).
  ✔️   Cluster is quorate
  ✔️   LXC Template List Updated
  ✔️   Started LXC Container
   💡   No network yet in LXC (try 1/10) – waiting...
  ✔️   Network in LXC is reachable
  ✔️   Customized LXC Container
  ✔️   Set up Container OS
  ✔️   Network Connected: 192.168.XXX
  ✔️   IPv4 Internet Connected
   ✖️   IPv6 Internet Not Connected
  ✔️   Git DNS: github.com:(✔️ ) raw.githubusercontent.com:(✔️ ) api.github.com:(✔️ ) git.community-scripts.org:(✔️ )
  ✔️   Updated Container OS
  ✔️   Download completed successfully
  ✔️   Remove Commercial modules is set to: yes
  ✔️   Module adv_recovery removed successfully
  ✔️   Module areminder removed successfully
  ✔️   Module broadcast removed successfully
  ✔️   Module callaccounting removed successfully
  ✔️   Module callerid removed successfully
  ✔️   Module calllimit removed successfully
  ✔️   Module cdrpro removed successfully
  ✔️   Module conferencespro removed successfully
  ✔️   Module cos removed successfully
  ✔️   Module endpoint removed successfully
  ✔️   Module extensionroutes removed successfully
  ✔️   Module faxpro removed successfully
   ✖️   Module oracle_connector could not be removed - error code 2
  ✔️   Module pagingpro removed successfully
  ✔️   Module parkpro removed successfully
  ✔️   Module pbxmfa removed successfully
  ✔️   Module pinsetspro removed successfully
  ✔️   Module pms removed successfully
  ✔️   Module queuestats removed successfully
  ✔️   Module qxact_reports removed successfully
  ✔️   Module recording_report removed successfully
  ✔️   Module restapps removed successfully
  ✔️   Module sangomaconnect removed successfully
  ✔️   Module sangomacrm removed successfully
  ✔️   Module sangomartapi removed successfully
  ✔️   Module scribe removed successfully
  ✔️   Module sipstation removed successfully
  ✔️   Module sms removed successfully
  ✔️   Module smsplus removed successfully
  ✔️   Module sysadmin removed successfully
  ✔️   Module vmnotify removed successfully
  ✔️   Module voicemail_report removed successfully
  ✔️   Module voipinnovations removed successfully
  ✔️   Module vqplus removed successfully
  ✔️   Module webcallback removed successfully
  ✔️   Removed commercial modules, retrying (attempt 1/5)...
  ✔️   Module oracle_connector removed successfully
  ✔️   Removed all commercial modules successfully
  ✔️   FreePBX reloaded completely
  ✔️   Installed FreePBX finished
  ✔️   Customized Container
  ✔️   Cleanup completed
  ✔️   Completed Successfully!
  🚀  FreePBX setup has been successfully initialized!
  💡   Access it using the following URL:
    🌐  http://192.168.XXX

@vsc55 vsc55 requested review from a team as code owners July 27, 2025 18:26
Copy link
Member

@CrazyWolf13 CrazyWolf13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR breaks about every of our conventions.
Please look through them, through our contributor docs and our other docs.

Comment on lines 51 to 67
print_msg() {
local type="$1"
local txt_normal="${2:-}"
local txt_verbose="${3:-}"

local func="msg_$type"

if [[ "$VERBOSE" == "yes" ]]; then
if [[ -n "$txt_verbose" ]]; then
$func "$txt_verbose"
else
$func "$txt_normal\n"
fi
else
$func "$txt_normal"
fi
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to use your own message func, we already have that

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

printf "\r\e[2K%s %b" "$HOURGLASS" "${YW}${msg}${CL}" >&2

Shouldn't this cause a line break when in verbose mode?
To avoid this, for example:
⏳ Installing FreePBX (Patience)2025-07-27 21:22:58 - Performing version check...
After adding the text, the text generated by the execution of the following command is added.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe because you used msg_info and msg_ok no correctly?

every msg_info needs a msg_ok it's like if fi, a block that needs to be closed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand it, when verbose is disabled, you first run msg_info to provide information about what's happening. Once the command is finished, you use msg_ok or msg_err, depending on how the process ends.
With verbose mode enabled, this isn't possible because you're displaying all the text on the console. Therefore, if you run msg_info and then another command, if it returns text to the console, it will be added to the same line, like the example I posted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- Added option to remove commercial modules
- Added option to update system and modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants