diff --git a/README.md b/README.md index 22009b5..186c5a3 100644 --- a/README.md +++ b/README.md @@ -90,10 +90,10 @@ To customize the portfolio: ```text /var/www/html/ # Web root directory ├── index.html # Portfolio website -/etc/xray/cert/ # SSL certificates directory -├── x.crt # SSL certificate -├── x.key # Private key -└── renew.sh # Certificate renewal script +~/cert/ # SSL certificates directory +├── x.crt # SSL certificate +├── x.key # Private key +└── cert-renew.sh # Certificate renewal script ``` ## 🔒 Security Features @@ -110,7 +110,7 @@ To customize the portfolio: Certificates are automatically renewed monthly via cron job. To manually renew: ```bash -bash /cert/etc/xray/cert/renew.sh +bash ~/cert/cert-renew.sh ``` ### Nginx Configuration diff --git a/setup.sh b/setup.sh index cbb7877..cc4b3f0 100644 --- a/setup.sh +++ b/setup.sh @@ -273,26 +273,26 @@ curl https://get.acme.sh | sh sudo bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install # Setup certificates -sudo mkdir -p /etc/xray/cert -~/.acme.sh/acme.sh --install-cert -d "$DOMAIN" --ecc --fullchain-file /etc/xray/cert/x.crt --key-file /etc/xray/cert/x.key -chmod +r /etc/xray/cert/x.key +mkdir ~/cert +~/.acme.sh/acme.sh --install-cert -d "$DOMAIN" --ecc --fullchain-file ~/cert/x.crt --key-file ~/cert/x.key +chmod +r ~/cert/x.key # Create certificate renewal script -cat >/etc/xray/cert/renew.sh <~/cert/cert-renew.sh <temp_cron -echo "0 1 1 * * bash /etc/xray/cert/renew.sh" >>temp_cron +echo "0 1 1 * * bash /home/$USERNAME/cert/cert-renew.sh" >>temp_cron crontab temp_cron rm temp_cron @@ -340,8 +340,8 @@ sudo tee /usr/local/etc/xray/config.json >/dev/null <