Dropbox gadget: support db installation in /opt

as found in the arch linux package
This commit is contained in:
Davide Andreoli 2017-08-11 08:03:17 +02:00
parent 10cf94460f
commit 68c1369c18
1 changed files with 8 additions and 2 deletions

View File

@ -99,9 +99,15 @@ class Dropbox(object):
self._status_changed_cb = status_changed_cb
self.BASE_FOLDER = os.path.expanduser('~/Dropbox')
self.DAEMON = os.path.expanduser('~/.dropbox-dist/dropboxd')
self.PIDFILE = os.path.expanduser('~/.dropbox/dropbox.pid')
self.CMD_SOCKET = os.path.expanduser('~/.dropbox/command_socket')
dist = os.path.expanduser('~/.dropbox-dist/dropboxd')
if os.path.exists(dist):
self.DAEMON = dist
elif os.path.exists('/opt/dropbox/dropboxd'):
self.DAEMON = '/opt/dropbox/dropboxd'
else:
self.DAEMON = None
self._cmd_socket = None
self._cmd_fdh = None
@ -115,7 +121,7 @@ class Dropbox(object):
@property
def is_installed(self):
return os.path.exists(self.DAEMON)
return True if self.DAEMON is not None else False
@property
def is_running(self):