Skip to content

Commit 3ef645c

Browse files
author
sheeek
committed
Remove automatic user switch, show clear instructions instead
Instead of trying to automatically switch users (which doesn't work reliably), display clear instructions to the user: 'CHANGE USER NOW with: sudo -i -u clawdbot' This is simpler, more reliable, and gives the user control. Updates: - run-playbook.sh: Show instructions instead of exec - install.sh: Update comment - README.md: Clarify post-install steps
1 parent 3630b28 commit 3ef645c

File tree

4 files changed

+34
-18
lines changed

4 files changed

+34
-18
lines changed

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,26 @@ curl -fsSL https://raw.githubusercontent.com/pasogott/clawdbot-ansible/main/inst
3333

3434
## Post-Install
3535

36+
After installation completes, switch to the clawdbot user:
37+
3638
```bash
37-
# 1. Connect to Tailscale
38-
sudo tailscale up
39+
sudo -i -u clawdbot
40+
```
3941

40-
# 2. Configure Clawdbot
41-
sudo nano /home/clawdbot/.clawdbot/config.yml
42+
This will show you the next steps for:
43+
- Configuring Clawdbot
44+
- Logging into your messaging provider (WhatsApp/Telegram/Signal)
45+
- Testing the gateway
46+
- Connecting Tailscale
4247

43-
# 3. Login as clawdbot user
44-
sudo su - clawdbot
48+
You can also manage the service:
49+
50+
```bash
51+
# Check status
52+
sudo systemctl status clawdbot
53+
54+
# View logs
55+
sudo journalctl -u clawdbot -f
4556
clawdbot login
4657

4758
# 4. Check status

install.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,4 @@ echo ""
9090
cd /
9191
rm -rf "$TEMP_DIR"
9292

93-
# The run-playbook.sh script will automatically launch /tmp/clawdbot-setup.sh
94-
# which handles the user switch and displays setup instructions
93+
# run-playbook.sh will display instructions to switch to clawdbot user

playbook.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@
9797
line: '[ -f ~/.clawdbot-welcome ] && source ~/.clawdbot-welcome'
9898
state: present
9999

100-
- name: Signal playbook completion
101-
ansible.builtin.set_fact:
102-
clawdbot_setup_ready: true
100+
- name: Notify that playbook is complete
101+
ansible.builtin.debug:
102+
msg: "✅ Clawdbot installation complete!"

run-playbook.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@ else
1010
PLAYBOOK_EXIT=$?
1111
fi
1212

13-
# After playbook completes successfully, switch to clawdbot user
13+
# After playbook completes successfully, show instructions
1414
if [ $PLAYBOOK_EXIT -eq 0 ]; then
1515
echo ""
16-
echo "🚀 Switching to clawdbot user..."
16+
echo "═══════════════════════════════════════════════════════════"
17+
echo "✅ INSTALLATION COMPLETE!"
18+
echo "═══════════════════════════════════════════════════════════"
19+
echo ""
20+
echo "🔄 CHANGE USER NOW with:"
21+
echo ""
22+
echo " sudo -i -u clawdbot"
23+
echo ""
24+
echo "This will switch you to the clawdbot user and show"
25+
echo "the next setup steps (configuration, provider login, etc.)"
26+
echo ""
27+
echo "═══════════════════════════════════════════════════════════"
1728
echo ""
18-
sleep 1
19-
20-
# The trick: replace current shell completely with sudo's shell
21-
# Don't use exec alone - use it within a login command
22-
exec sudo -u clawdbot -i
2329
else
2430
echo "❌ Playbook failed with exit code $PLAYBOOK_EXIT"
2531
exit $PLAYBOOK_EXIT

0 commit comments

Comments
 (0)