Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ install_base() {

gen_random_string() {
local length="$1"
local random_string=$(LC_ALL=C tr -dc 'a-zA-Z0-9' </dev/urandom | fold -w "$length" | head -n 1)
echo "$random_string"
# openssl output base64,no need /dev/urandom + tr
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

The comment contains a Chinese full-width comma () instead of a standard ASCII comma (,). All other comments in this file use ASCII punctuation. The comment is also somewhat cryptic — consider rephrasing to something clearer like: # Use openssl base64 output instead of /dev/urandom to reduce CPU usage.

Suggested change
# openssl output base64,no need /dev/urandom + tr
# Use openssl base64 output instead of /dev/urandom + tr to reduce CPU usage

Copilot uses AI. Check for mistakes.
openssl rand -base64 $(( length * 2 )) \
| tr -dc 'a-zA-Z0-9' \
| head -c "$length"
}

Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

This line contains trailing whitespace (4 spaces on a blank line). It should be a clean blank line (or removed entirely) to keep the file tidy, matching the convention of blank lines between functions elsewhere in the file (e.g., line 105 between install_base and gen_random_string).

Suggested change

Copilot uses AI. Check for mistakes.
install_acme() {
echo -e "${green}Installing acme.sh for SSL certificate management...${plain}"
cd ~ || return 1
Expand Down
Loading