Refine password validation to separately check length and character
requirements for better clarity. Add detailed error messages showing
password length and value on failure. Implement automatic Portainer
restart attempts on validation failure to maintain service availability.
* ✨ feat: Add Portainer password reset script
This commit introduces a new script `run.sh` that allows users to easily reset the Portainer administrator password. The script performs the following key changes:
- Checks if Docker is running and accessible
- Finds the Portainer container and its associated data volume
- Detects the deployment type (container, service, or stack)
- Stops the Portainer instance based on the deployment type
- Provides a user prompt to confirm the password reset
- Resets the Portainer administrator password
The script is designed to be user-friendly, providing clear instructions and error handling to ensure a smooth password reset process. This feature will help Portainer users who have lost or forgotten their administrator password, allowing them to regain access to their Portainer instance.
* 🔧 feat(reset-portainer-password): Add support for Portainer stacks
This commit adds support for resetting the Portainer administrator password
when Portainer is deployed as a Docker stack. Previously, the script only
supported Portainer containers and services.
The key changes are:
- Detect if Portainer is deployed as a stack and find the corresponding
service name
- Scale down the Portainer stack service to 0 replicas before resetting the
password
- Scale up the Portainer stack service to 1 replica after resetting the
password
- Improve the logic for finding the Portainer data volume or bind mount
- Update the README with information about bind mounts
* 🔧 refactor: Improve error handling in Portainer password reset script
The changes in this commit focus on improving the error handling in the Portainer password reset script. The main changes are:
- Replaced the `check_command` function with a more generic `handle_error` function that prints the error message and exits the script.
- Simplified the error handling in various places by using the `|| handle_error` pattern instead of explicit error checking.
- Temporarily disabled `set -e` when running the Portainer password reset helper to properly capture the exit code.
- Improved the logic for finding the Portainer container and volume/mount by using the `||` operator instead of explicit error checking.
These changes make the script more robust and easier to maintain by centralizing the error handling logic and reducing duplication.
* ✨ refactor: improve error handling and rename error function
Replace generic handle_error calls with handle_command_error for clearer
command failure handling in Portainer service scaling and container
operations. Introduce a detailed handle_error function to trap errors,
providing line number, exit code, and failed command for better diagnostics.
Enhance script robustness and maintainability by improving error reporting.
* feat(reset-portainer-password): improve error handling and deployment detection
Enhance error handling with detailed diagnostics on failure using ERR trap.
Refine Docker and Portainer container checks for accuracy and robustness.
Improve volume detection logic to handle mounts and fallback volume names.
Add deployment type detection to distinguish container, service, or stack.
Update script flow to confirm actions and handle different deployment types
appropriately when stopping and restarting Portainer.
This commit introduces a comprehensive Unicode Security Scanner that
detects a wide range of dangerous Unicode characters that can be used
in security attacks, including Trojan Source attacks (CVE-2021-42574)
and other invisible characters. The scanner uses a list of harmful
Unicode patterns in hex format for efficient grep-based scanning.
This commit adds a new script `check-for-unicode/run.sh` that scans files and directories for potentially dangerous Unicode characters. These characters can be exploited in AI systems, cause display/parsing issues, or enable social engineering attacks.
The script detects a comprehensive list of harmful Unicode characters, including:
- Zero-width and invisible characters
- Bidirectional text controls (Trojan Source attacks)
- Annotation and formatting characters
- Line and paragraph separators
- Additional format characters
- Variation selectors
The script can be used to identify these characters in files and directories, helping to improve the security and reliability of systems that process text data.
This commit adds a new script `run.sh` to the `install-cursor` directory. The script
automates the process of downloading and installing the Cursor AI application for
various platforms (macOS, Linux, and Windows).
The key changes include:
- Fetching the latest version information from a JSON file
- Detecting the user's operating system and architecture
- Downloading the appropriate binary for the detected platform
- Verifying the binary's signature and notarization status on macOS
- Installing the application on the user's system
This script aims to simplify the installation process and ensure a smooth user
experience when setting up the Cursor AI application.
This commit adds the LAN IP address to the Nextcloud configuration file
(`config.php`). The changes ensure that Nextcloud can be accessed using the
LAN IP address, in addition to the default `localhost` address.
The key changes are:
- Implement a function `Get_IPs()` to reliably detect the LAN IP address,
prioritizing non-loopback and non-docker interfaces.
- Use the detected LAN IP address to update the `config.php` file, adding it
as an additional entry in the `trusted_domains` setting.
- Backup the original `config.php` file before making changes.
* 🔧 feat(install-casaos): Add function to check and uninstall Docker from Snap
This commit adds a new function `Check_Docker_Snap()` to the `install-casaos/run.sh` script. The purpose of this function is to check if Docker is installed via Snap and provide a prompt to uninstall the Snap version if necessary.
Snap-based Docker installations can cause compatibility issues with CasaOS, so it's recommended to uninstall the Snap version before proceeding with the CasaOS installation. This function helps to ensure a smooth installation process by addressing this potential issue.
The function first checks if Docker is installed via Snap. If so, it displays a warning message and prompts the user to confirm whether they want to uninstall the Snap version. If the user confirms, the function proceeds to uninstall Docker from Snap. If the user declines, the function skips the uninstallation and provides a warning that this may cause issues with CasaOS.
The function is then called within the `Install_Docker()` function to handle the Snap-based Docker installation before proceeding with the main Docker installation.
* 🔖 feat(install-casaos/run.sh): Update CasaOS Installer version
Updates the CasaOS Installer version from V0.1 to V0.3 to reflect the latest
release.
This commit enhances the IP detection and display functionality in the CasaOS installer script. The key changes are:
- Improved the logic to retrieve the CasaOS port from the configuration file, with a fallback to port 80 if the port cannot be determined.
- Implemented a simpler approach to get the first non-loopback IP address, which is usually the LAN IP.
- Added more advanced methods to identify and exclude Docker, virtual, and other non-physical interfaces when retrieving IP addresses.
- Improved the display of the CasaOS URL, showing the IP address and port in a user-friendly format.
These changes aim to provide a more reliable and user-friendly experience when installing CasaOS, ensuring that the correct IP address and port are displayed for easy access to the CasaOS web interface.
The changes include:
1. Added a new README.md file in the `install-casaos` directory, which provides a simple command to run the CasaOS installation script.
2. Added a new `run.sh` script in the `install-casaos` directory, which is the main CasaOS installation script. This script includes functionality to automatically check SSL certificate validity and disable SSL/TLS certificate verification if necessary for problematic domains.
These changes aim to provide a convenient way for users to install CasaOS on their systems by running a single command.
Adds a video link to the README file for the reset-password-for-casaos
feature. This will provide users with a visual guide on how to reset
their password for CasaOS.
This commit adds a new script to generate a LibreDesk configuration file. The
script prompts the user for the desired location to save the config file, and
then downloads the default config from the BigBearTechWorld/big-bear-casaos
repository and saves it to the specified location. If the file already exists,
the user is asked for confirmation before overwriting it.
* ✨ feat: Add ARP interface finder script and README
This commit adds a new script, `run.sh`, that finds all usable network
interfaces for `arp-scan` and exports them to a configuration file. The
script detects interfaces that are "UP" (usable for scanning), skips
virtual container interfaces (veth), and handles special cases like
`eth0@if46` that might be in different network namespaces.
Additionally, a README file is added to provide instructions on how to
run the command.
* ✨ feat(arp-iface-finder): Use bash shebang for portability
Modify the shebang line in the `run.sh` script to use `#!/usr/bin/env bash`
instead of `#!/bin/bash`. This ensures the script will run on systems
where the bash binary is not located at `/bin/bash`, improving
portability.
The changes update the URL used to fetch the Romm configuration file. The
previous URL was pointing to an outdated location, so the new URL is
updated to fetch the config from the correct location on the master
branch.
This commit introduces a new script called `bigbear-casaos-server-finder/run.sh` that
allows users to discover CasaOS servers on their local network.
The key features of this script include:
- Automatic discovery of available subnets on the system
- Ability to scan multiple ports (configurable) for each IP address
- Parallel scanning to speed up the process
- Logging of the results to a log file
- Handling of missing dependencies (nmap and iproute2)
- User-friendly output with color-coded messages
- Option to select a specific subnet to scan for faster results
This script is designed to help BigBearTechWorld community members easily find
CasaOS servers on their local networks, making it easier to connect to and
manage their CasaOS instances.
portability
Changes the shebang line from `#!/bin/bash` to `#!/usr/bin/env bash` to
ensure the script runs on systems where the bash binary may not be
located at `/bin/bash`.
* ✨ feat: Implement robust network configuration for Pterodactyl
This commit introduces a comprehensive network configuration process for the
Pterodactyl setup. The key changes include:
- Implementing a function to find an available subnet that is not already in use
by the system or other Docker networks. This helps ensure the Pterodactyl
network does not conflict with existing network configurations.
- Calculating the gateway IP address for the selected subnet, which is then
used when creating the Docker network.
- Enhancing the `create_pterodactyl_network()` function to handle network
creation with proper error checking and verification.
- Refactoring the `configure_network()` function to orchestrate the entire
network configuration process, including subnet discovery, gateway
calculation, and network creation.
- Adding detailed comments to explain the purpose and flow of the network
configuration logic.
These changes improve the reliability and robustness of the Pterodactyl setup
by ensuring the network is properly configured and does not interfere with
existing network resources.
* 🔧 feat(setup-pterodactyl-wings): Improve network configuration and
directory setup
This commit introduces the following improvements:
- Provide better error handling and feedback when finding an available subnet
fails
- Display a success message when the Docker network is created successfully
- Enhance the quick setup option by using a spinner to show the progress of
chown commands
- Improve the formatting and messaging throughout the script for better
readability and user experience
The changes aim to provide a more robust and user-friendly setup process for
the Pterodactyl wings component.
Adds a user choice menu to the setup script, allowing the user to either
run the full setup or only execute the chown commands. This provides more
flexibility and control for the user during the setup process.
This commit adds a new script `run.sh` that handles the network configuration and directory setup for Pterodactyl Wings. The key changes include:
- Checks if a UUID argument is provided and exits with an error if not
- Implements functions to check if a subnet is in use, find an available subnet, and get the gateway for a subnet
- Creates the `pterodactyl_nw` Docker network with the available subnet and gateway
- Creates the required directories for Pterodactyl (/var/lib/pterodactyl/volumes, /tmp/pterodactyl, /etc/pterodactyl, /var/log/pterodactyl)
- Sets the appropriate ownership for the created directories
- Restarts the `pterodactyl-wings` container to apply the changes
This script simplifies the setup process for Pterodactyl Wings and helps ensure the network configuration and directory structure are properly set up.
* ✨ feat: Add interactive rsync script
This commit introduces a new interactive rsync script that allows users to
visually select specific files and directories for synchronization. The
script provides the following features:
- Interactive file/directory selection
- Color-coded interface for better visibility
- Multiple file selection support
- Progress indication during transfer
- Automatic destination directory creation
- Input validation and error handling
The script is designed to simplify the rsync process by eliminating the need
for complex command-line arguments, making it more user-friendly and
accessible for a wider audience.
* ✨ feat: Add file size display and transfer confirmation
This commit adds the following improvements to the interactive-rsync script:
- Displays the file/directory size next to each item in the selection menu.
- Adds a confirmation prompt before starting the transfer to ensure the user is ready.
- Allows the user to specify file patterns to exclude from the transfer.
- Displays a summary of the successful and failed transfers at the end of the process.
These changes enhance the user experience by providing more information and control over the file transfer process.
Updates the tool name displayed in the header from "Debian Docker Disk
Recovery Tool" to "Big Bear Debian Docker Disk Recovery Tool". This
change reflects the branding of the tool and provides a more
descriptive name for users.
This commit introduces a new Debian Docker Disk Recovery Tool script that
helps users recover disk space on their systems by managing Docker
resources. The key changes include:
- Implement a script to start, install, and clean up Docker resources
- Add functions to check available disk space, display disk usage, and
confirm user actions
- Provide instructions for users on recommended next steps after running
the script
- Use color formatting and headers to improve the user experience
* 🔧 feat(healthcheck): Add process resource check
Adds a new check to the healthcheck script that
displays the top 5 CPU and memory consuming
processes, as well as checks for any zombie
processes. This provides more detailed
information about the system's resource
utilization.
* ✨ feat: Implement comprehensive system health checks
This commit introduces a comprehensive system health check module to the CasaOS
healthcheck script. The new checks include:
- Network interface status and error/drop monitoring
- Network latency testing to common targets
- Filesystem health checks, including inode usage and mount point write access
- Time synchronization status, including NTP sync
- Log rotation configuration and large log file detection
These additional checks provide a more thorough assessment of the overall system
health, helping to identify potential issues that could impact the CasaOS
application. The goal is to proactively detect and report on common system
problems, allowing users to address them before they become critical.
* ✨ feat(casaos-healthcheck): Update healthcheck version to 3.4
The changes update the version of the BigBearCasaOS Healthcheck from 3.3 to 3.4. This
update is necessary to reflect the latest improvements and bug fixes in the
healthcheck script.
* 🔧 feat(casaos-setup-coolify): Add setup script for Coolify
This commit adds a setup script for Coolify, a self-hosted platform for deploying web applications. The script performs the following tasks:
- Installs and configures an SSH server based on the detected operating system.
- Generates an SSH key pair for Coolify and sets the appropriate permissions.
- Creates a Docker network for Coolify.
- Provides an option to display the generated private SSH key.
- Includes a menu-driven interface for running the setup or clearing the Coolify cache.
The changes aim to simplify the setup process for Coolify on CasaOS, making it more accessible to users.
* ✨ feat: Update CasaOS Coolify setup script URL
The changes update the URL for the CasaOS Coolify setup script in the
README.md file. This ensures that users are directed to the correct
script location for setting up Coolify on CasaOS.
This commit introduces a new CasaOS toolkit that provides
various diagnostic and troubleshooting tools for CasaOS users.
The toolkit includes the following features:
- Collect system information and logs for troubleshooting
- Fix Docker permissions issues
- Repair Docker overlay2 storage driver problems
- Perform a full system reset (clean reinstall of Docker and CasaOS)
The toolkit is designed to help CasaOS users quickly diagnose
and resolve common issues they may encounter with their CasaOS
installations.
Adds a new function to check the system dmesg logs for any critical errors or warnings. This
helps identify potential hardware or kernel issues that may impact the system stability.
The function will print out the last 10 errors found in the dmesg logs, and indicate if
there are more errors. It also warns the user if they don't have the required permissions
to read the dmesg logs.
This change is important to provide a more comprehensive health check for CasaOS systems,
as dmesg logs can often contain valuable information about underlying system issues.
Adds two new functions, `check_root_privileges()` and `check_sudo_privileges()`, to handle
the cases where the script is run with insufficient privileges. The script now
provides clearer instructions and prompts the user to either continue with the
limited functionality or exit and run the script with the required privileges.
This commit refactors all the shell scripts to use `#!/usr/bin/env bash` instead of `#!/bin/bash`. This change ensures that the scripts will run with the system's default Bash interpreter, even if it is not located at the standard `/bin/bash` path.
Replaces the hardcoded shebang `#!/bin/bash` with `#!/usr/bin/env bash` to
ensure the script can be executed on systems where the Bash binary is not
located at the default path `/bin/bash`.
This commit introduces the following changes:
- Checks if the script is running with sudo privileges. If not, it prompts the
user to continue without sudo or exit the script.
- Updates the version display of the BigBearCasaOS Healthcheck to V3.2.
The sudo check is added to ensure that the script can perform all necessary
checks and provide complete information, as some checks may require elevated
privileges. The version update reflects the latest release of the healthcheck
tool.
This commit introduces several improvements to the server update script:
- Added branding message and decorative lines for better presentation
- Implemented an unattended mode to allow for automated updates without user prompts
- Added functions to check disk space and handle known problematic packages
- Divided the update process into multiple steps (update package list, upgrade packages, full upgrade, remove unnecessary packages, clean cache) with user confirmation prompts
- Improved logging to a log file for better troubleshooting
- Added instructions on how to support the project
The goal of these changes is to provide a more user-friendly and reliable server update script for Ubuntu and Debian systems.
This commit introduces a set of functions and variables to provide colorful and formatted console output for the `run.sh` script. It includes the following changes:
- Added color variables for ANSI escape codes (BLUE, GREEN, YELLOW, RED, BOLD, NC).
- Added Unicode characters for various symbols (CHECK_MARK, CROSS_MARK, RIGHT_ARROW, INFO_MARK).
- Created print functions for success, warning, and error messages.
- Displayed a welcome message with community links and support information.
- Formatted the memory output to display in MB or GB as appropriate.
- Improved the formatting and readability of the script's output.
The primary goal of these changes is to enhance the user experience and make the script's output more visually appealing and informative.
This commit introduces the following changes:
1. Adds a new function `check_docker_ports` to the `casaos-healthcheck/run.sh` script. This
function checks if Docker is installed and running, and if UFW (Uncomplicated Firewall)
is installed and active. It then retrieves all running Docker containers and checks if
the ports exposed by these containers are allowed by the UFW rules. If a port is not
allowed, a warning is displayed.
2. Updates the version display in the `print_header` function from "BigBearCasaOS Healthcheck
V3.0" to "BigBearCasaOS Healthcheck V3.1".
The Docker port check is an important addition to the healthcheck script, as it helps
identify potential issues with firewall rules that may be blocking Docker container ports.
This can be especially useful in troubleshooting network-related problems.
The version update reflects the changes introduced in this commit.
* ✨🔑 feat(reset-password): Add fallback for missing user.db
This change adds a fallback mechanism to handle cases where the
`/var/lib/casaos/db/user.db` file is not found. If the file is
missing, the script attempts to check if the file exists in an
alternative location. If found, it backs up the file and restarts
the CasaOS user service to ensure the password reset functionality
works correctly.
* 🔐 feat(reset-password-for-casaos): Remove user.db existence
check and provide alternative method
The changes remove the check for the existence of the `user.db` file
and provide an alternative method to handle the case where the file is
not found. This change is intended to make the password reset process
more robust and accommodate systems where the `user.db` file may not be
present.
This commit introduces several improvements to the CasaOS password reset script:
- Adds functions to print headers, check service status, and backup the user database.
- Checks if the script is run with sudo privileges.
- Displays a welcome message with links and information about supporting the project.
- Checks if the CasaOS service is active before proceeding.
- Prompts the user for confirmation before resetting the password.
- Backs up the user database before removing the original file.
- Restarts the CasaOS user service to reflect the changes.
- Provides clear success and error messages to the user.
These changes aim to make the password reset process more robust, user-friendly, and informative.
* 🎨 feat(healthcheck): add new health checks for Docker and storage
This commit introduces two new health checks to the BigBearCasaOS
Healthcheck script:
1. `check_docker_status()`: This function checks if Docker is installed and
running on the system. It provides clear feedback based on the Docker
status.
2. `check_storage_health()`: This function checks the health of all storage
devices (disks) connected to the system using the `smartctl` tool. It
reports the health status of each disk, indicating if it has passed the
SMART health check or if there may be potential issues.
These new health checks provide a more comprehensive overview of the system's
overall health and help identify any potential issues related to Docker or
storage-related problems.
* ✨📄 feat(casaos-healthcheck): Enhance DNS resolution and add system health checks
This change enhances the DNS resolution checks in the casaos-healthcheck script and adds new system health checks for disk space, CPU load, memory usage, and system temperature.
The key changes include:
- Improve DNS resolution by trying multiple DNS servers and retrying on failure
- Add a check for basic network connectivity before attempting DNS lookups
- Implement a check for disk space usage, with a configurable threshold
- Implement a check for CPU load, with a configurable threshold based on the number of cores
- Implement a check for memory usage, with a configurable threshold based on total memory
- Implement a check for system temperature, using the `sensors` command or `/sys/class/thermal` when available
- Add a check for available system updates using `apt-get`
These new checks provide a more comprehensive health monitoring solution for the CasaOS system.
* ✨ feat: Bump healthcheck version to 3.0
Bumped the version of the BigBearCasaOS Healthcheck tool from 2.3 to 3.0.
This change reflects the latest updates and improvements made to the
healthcheck script.
This commit introduces several improvements to the Docker cleanup script:
- Adds a verbose mode to print detailed messages during the cleanup process.
- Implements a dry run mode to simulate the cleanup without actually removing any resources.
- Improves the container, image, volume, and network cleanup functions to better handle the cleanup process and provide more informative output.
- Adds a summary of the cleanup results at the end of the script.
- Includes a help message to explain the available options.
- Refactors the script to improve readability and maintainability.
The main goal of these changes is to provide a more user-friendly and robust Docker cleanup solution.
This change ensures that the new Portainer container is created with the same ports as the
current configuration. It first checks the existing Portainer container to get the
current port mappings, and then uses those values when starting the new container.
This way, clients do not need to update any of their configurations when the Portainer
version is updated.