cloudflare / cloudflare/cloudflared

🐛 service uninstall command should NOT automatically restart the running service too :cry:

Open
#1,327 0 comments 0 reactions 0 assignees View on GitHub
Priority: Normal Type: Bug
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Long story short I had to issue the service uninstall command, `cloudflared service uninstall`, on a remote server to clear up the service files and regenerate new ones when I, inadvertently, had my ssh session terminated, as well, by this operation. And the warning message does NOT warn of the potentially dire side effects.
```
error generating service template error="cloudflared service is already installed at /etc/systemd/system/cloudflared.service; if you are running a cloudflared tunnel, you can point it to multiple origins, avoiding the need to run more than one cloudflared service in the same machine; otherwise if you are really sure, you can do `cloudflared service uninstall` to clean up the existing service and then try again this command"
```

**To Reproduce**
issue `cloudflared service uninstall` on a remote server that is running the cloudflared service.

If it's an issue with Cloudflare Tunnel:
4. Tunnel ID : N/A
5. cloudflared config: N/A

**Expected behavior**
Either be warned OR better do not automatically shutdown/restart the running service, at least not without explicit confirmation.

**Environment and versions**
- OS: Archlinux
- Architecture: x86
- Version: 2024.8.3

**Logs and errors**
N/A

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.