Add support for root account execution without sudo

- Update script comments and documentation for root vs regular users
- Improve error message for missing root privileges
- Add separate command examples for root accounts (Proxmox, containers, etc.)
- Update README and installation guide with both sudo and non-sudo examples

🚀 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
시골약사 2025-09-11 00:44:44 +09:00
parent 591173d1cf
commit f69ee95443
3 changed files with 24 additions and 7 deletions

View File

@ -6,12 +6,20 @@
### 방법 1: curl 사용 (권장)
```bash
# 일반 사용자 계정에서
curl -fsSL https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | sudo bash
# root 계정에서 (Proxmox, Docker 컨테이너 등)
curl -fsSL https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | bash
```
### 방법 2: wget 사용
```bash
# 일반 사용자 계정에서
wget -qO- https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | sudo bash
# root 계정에서
wget -qO- https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | bash
```
### 방법 3: 스크립트 다운로드 후 실행
@ -23,8 +31,11 @@ sudo ./quick-install.sh
### 방법 4: 기존 Tailscale 연결이 있는 경우 (강제 재등록)
```bash
# 기존 Tailscale/Headscale 연결을 강제로 해제하고 재등록
# 일반 사용자 계정에서
curl -fsSL https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | sudo bash -s -- --force
# root 계정에서 (Proxmox 등)
curl -fsSL https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | bash -s -- --force
```
### 방법 5: 스크립트 옵션 확인

View File

@ -137,17 +137,20 @@ git push origin main
### 빠른 설치 (권장)
```bash
# 일반 사용자 계정
curl -fsSL https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | sudo bash
```
### 또는 wget 사용
```bash
wget -qO- https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | sudo bash
# root 계정 (Proxmox 등)
curl -fsSL https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | bash
```
### 기존 Tailscale 연결이 있는 경우 (강제 재등록)
```bash
# 일반 사용자
curl -fsSL https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | sudo bash -s -- --force
# root 계정
curl -fsSL https://git.0bin.in/thug0bin/headscale-tailscale-replacement/raw/branch/feature/working-headscale-setup/quick-install.sh | bash -s -- --force
```
### 지원 OS

View File

@ -3,7 +3,8 @@
# 팜큐(FARMQ) Headscale 원클릭 설치 및 등록 스크립트
# 사용법: curl -fsSL https://git.0bin.in/.../quick-install.sh | sudo bash
# 또는: wget -qO- https://git.0bin.in/.../quick-install.sh | sudo bash
# 강제 재등록: curl -fsSL https://git.0bin.in/.../quick-install.sh | sudo bash -s -- --force
# root 계정: curl -fsSL https://git.0bin.in/.../quick-install.sh | bash
# 강제 재등록: curl -fsSL https://git.0bin.in/.../quick-install.sh | bash -s -- --force
set -e
@ -99,7 +100,9 @@ check_requirements() {
# Root 권한 확인
if [ "$EUID" -ne 0 ]; then
print_error "이 스크립트는 root 권한으로 실행해야 합니다."
print_info "sudo $0 로 다시 실행해주세요."
print_info "다음 중 하나의 방법으로 다시 실행해주세요:"
print_info "1. sudo가 있는 경우: curl ... | sudo bash"
print_info "2. root 계정인 경우: curl ... | bash"
exit 1
fi