View previous topic :: View next topic |
Author |
Message |
lordalbert l33t
Joined: 26 Nov 2006 Posts: 840 Location: Italy
|
Posted: Mon Jan 19, 2015 7:30 pm Post subject: info dropbox status |
|
|
Hi,
i have installed dropbox, add it to default runlevel ( rc-update add dropbox default ) and this is my /etc/conf.d/dropbox file:
Quote: |
DROPBOX_USERS="matteo"
PID_DIR=/var/run/dropbox
|
Dropbox is running and works (it sync correctly), but if i want to know the dropbox status (if all file is yet syncronized, or if it is working and i can't switch off computer now), with the usual command , it get me error:
Code: |
$ dropbox status
killed
|
(and appears dropbox's icon in system tray).
If i don't launch dropbox at boot (at default runlevel) but i launch it by user, the command "dropbox status" report the current status of the daemon.
Have you this problem? How could i solve it? Thank you! |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3350
|
Posted: Mon Jan 19, 2015 7:42 pm Post subject: |
|
|
try
rc-service dropbox ineed
rc-update --update
rc-service dropbox ineed
Perhaps some dependency is simply not ready when dropbox starts so it fails.
Also, using ineed twice will let you compare results. It happened to me a few times that cache had gone out of sync with declared dependencies. In this case rc-update --update might fix it. |
|
Back to top |
|
|
lordalbert l33t
Joined: 26 Nov 2006 Posts: 840 Location: Italy
|
Posted: Mon Jan 19, 2015 7:51 pm Post subject: |
|
|
There's no differences in the first and second rc-service dropbox ineed
Quote: |
# rc-service dropbox ineed
fsck localmount sysfs net.enp3s0
# rc-update --update
* Caching service dependencies ... [ ok ]
# rc-service dropbox ineed
fsck localmount sysfs net.enp3s0
|
Is ok, or it should be different? |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3350
|
Posted: Mon Jan 19, 2015 8:16 pm Post subject: |
|
|
No idea, it does contain everything I'd think about. However, the biggest difference between running it manually and running it with openrc is the time at which you do that. Launching it manualy will always happen after everything that was to start, has already started, so I thought broken deps. Which in fact can still be a case. What if you remove it from default runlevel and create "dropbox.start" inside /etc/local.d/ which will in turn launch dropbox? AFAIR those scripts are started at the end of boot process.
It might be a good idea to grep through logs (grep dropbox /var/log/everything/current) in search for hints.
rc-status might also be a good place to look for tips. |
|
Back to top |
|
|
lordalbert l33t
Joined: 26 Nov 2006 Posts: 840 Location: Italy
|
Posted: Tue Jan 20, 2015 11:11 am Post subject: |
|
|
I saw rc log, and i found a warning about dropbox:
Quote: |
* Bringing up interface enp3s0
* Starting ifplugd on enp3s0 ...
[ ok ]
* Backgrounding ...
* WARNING: net.enp3s0 has started, but is inactive
* Starting cupsd ...
[ ok ]
* WARNING: dropbox will start when net.enp3s0 has started
* WARNING: netmount will start when net.enp3s0 has started
|
I don't understand why "net.enp3s0 is inactive". Net works perfectly... |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3683
|
Posted: Tue Jan 20, 2015 11:22 am Post subject: |
|
|
lordalbert wrote: | I don't understand why "net.enp3s0 is inactive". Net works perfectly... |
Maybe it turned active later? You can check the present state using rc-config |
|
Back to top |
|
|
lordalbert l33t
Joined: 26 Nov 2006 Posts: 840 Location: Italy
|
Posted: Tue Jan 20, 2015 11:50 am Post subject: |
|
|
ok, is all started:
Quote: |
$ rc-config show
Status of init scripts in runlevel "default"
consolekit [started]
cupsd [started]
dbus [started]
dropbox [started]
net.enp3s0 [started]
syslog-ng [started]
vixie-cron [started]
|
Dropbox is started too. It works, but when i do "dropbox status" i have the problem described above. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3683
|
Posted: Tue Jan 20, 2015 12:55 pm Post subject: |
|
|
lordalbert wrote: | Dropbox is started too. It works, but when i do "dropbox status" i have the problem described above. | With dropbox [started] I am getting Quote: | $ dropbox status
Another instance of Dropbox (4698) is running! | And after "/etc/init.d/dropbox stop" doing "dropbox status" opens a window where I could open an acount with dropbox.
Are you sure you need to start it as a service? |
|
Back to top |
|
|
lordalbert l33t
Joined: 26 Nov 2006 Posts: 840 Location: Italy
|
Posted: Tue Jan 20, 2015 1:04 pm Post subject: |
|
|
i think to run it as a service because i'd like to start it when i boot the system. Sometimes, when i only need to edit files (i.e. when programming), i don't start X server, so i can't set to run automatically when i start WM/DE. I should run it manually. I prefer to run it automatically, not manually.
Is there a way to run sw when i login? |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3683
|
Posted: Tue Jan 20, 2015 2:15 pm Post subject: |
|
|
lordalbert wrote: | i think to run it as a service because i'd like to start it when i boot the system. Sometimes, when i only need to edit files (i.e. when programming), i don't start X server, so i can't set to run automatically when i start WM/DE. I should run it manually. I prefer to run it automatically, not manually.
Is there a way to run sw when i login? | Never tried with a service file, and not sure if could be done in the startup script http://wiki.gentoo.org/wiki/Fluxbox#Setting_a_theme.2C_background.2C_and_a_startup_script |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3350
|
Posted: Tue Jan 20, 2015 9:00 pm Post subject: |
|
|
Quote: | Is there a way to run sw when i login? |
There is, you can put it in ~/.bashrc, just make sure it does not output anything. Really anything.
net starts, but it must be fully configuring before it becomes active. This includes for example waiting for DHCP to provide you with IP address in case of automagic configuration. Holding back the other services is intended behavior to prevent them from attempting to access network that doesn't work yet (but is expected to work soon™)
Soon™ ranges from "in a few seconds", to "when it's ready", to "it had to be today, but we screwed up so maybe tommorow", to "stop asking us every half a year" |
|
Back to top |
|
|
lordalbert l33t
Joined: 26 Nov 2006 Posts: 840 Location: Italy
|
Posted: Wed Jan 21, 2015 3:52 pm Post subject: |
|
|
ok, i was wrong. the "killed" output is not due to add dropbox as a service.
Now i removed dropbox from launch at boot, i login and
("ucciso" is the translate of "killed" in italian)
so the problem is dropbox, not how i launch it. |
|
Back to top |
|
|
lordalbert l33t
Joined: 26 Nov 2006 Posts: 840 Location: Italy
|
Posted: Thu Jan 22, 2015 3:18 pm Post subject: |
|
|
ok, i think it could be the normal working of dropbox. Launch only one time "dropbox" command (is a daemon) and to control that daemon, install and use "dropbox-cli"
But i remember i used "dropbox status", that now it doesn't work anymore. Pheraps it was an old version of dropbox, and now the things are changes. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3350
|
Posted: Thu Jan 22, 2015 9:45 pm Post subject: |
|
|
Hold on a second, if you want to check status of a service, you ask the service about it's status rather than launching the executable alone.
And the service in your case should be /etc/init.d/dropbox.
So, don't run dropbox status. Run /etc/init.d/dropbox status instead.
Or rc-service dropbox status.
It is provided with rc scripts, isn't it? If it is, you can expect those scripts to work. They tend to do that pretty well.
Rc-status also is an option. But simple "dropbox status" most likely is not. |
|
Back to top |
|
|
lordalbert l33t
Joined: 26 Nov 2006 Posts: 840 Location: Italy
|
Posted: Fri Jan 23, 2015 3:01 pm Post subject: |
|
|
Quote: |
$ /etc/init.d/dropbox status
dropboxd for USER matteo: running.
|
Quote: |
$ dropbox-cli status
Updated
|
/etc/init.d/dropbox status tell me the status of daemon (if the daemon is running or not).
command line tool dropbox-cli status tell me the status of the syncing (if it is "updated", all file are synced, otherwise it tells me how many files needs to be updated/synced).
I'd like to know the status of the sync, so i don't poweroff system if it didn't synced yet. |
|
Back to top |
|
|
|