Skip to content

Instantly share code, notes, and snippets.

View llccing's full-sized avatar
🎯
Focusing

Rowan Liu llccing

🎯
Focusing
View GitHub Profile
#!/bin/bash
# 确保脚本以 root 权限运行
if [ "$EUID" -ne 0 ]
then echo "请以 root 权限运行"
exit
fi
# 更新系统包列表
echo "更新系统包列表..."
#!/bin/bash
# 脚本用于自动化配置 Nginx 以支持 HTTPS 和 WebSocket (WSS)
# 新子域名
new_domain=$1
# 检查参数
if [ -z "$new_domain" ]; then
echo "Usage: $0 <newdomain.xindamate.com>"
#!/bin/bash
# 数据库配置变量
DB_USER="xxx"
DB_PASSWORD="xxx"
DB_NAME="xxx"
DB_HOST="0.0.0.0" # 监听所有 IP 地址,根据需要可以修改为特定的外部 IP 地址
# 安装 PostgreSQL
echo "Installing PostgreSQL..."
#!/bin/bash
# 定义数据库相关变量
DB_USER="newxxx"
DB_PASSWORD="newxxx"
DB_NAME="newxxx"
# 确保 PostgreSQL 服务正在运行
sudo systemctl start postgresql