The CLI command "dropbox running" returns exit code 1 when Dropbox
is running and exit code 0 when it is not running.
user@host:~$ ps aux | grep dropbox$
user 13953 6.9 2.8 7108024 442272 ? Ssl 07:13 1:24 /home/user/.dropbox-dist/dropbox-lnx.x86_64-252.4.3485/dropbox
user@host:~$ dropbox running
user@host:~$ echo $?
1
user@host:~$ dropbox stop
user@host:~$ dropbox running
user@host:~$ echo $?
0
This is contrary to standard Unix conventions where exit code 0
indicates success/true and non-zero indicates failure/false.
Steps to reproduce:
- Start Dropbox
- Run: dropbox running; echo $?
- Result: exit code 1 (running)
- Run: dropbox stop && dropbox running; echo $?
- Result: exit code 0 (not running)
Expected behavior:
- exit code 0 when Dropbox is running
- exit code 1 when Dropbox is not running
This makes it impossible to use "dropbox running" reliably in shell scripts without inverting the logic, which is confusing and error-prone.