AS A USER, NOT ROOT, ssh to the server (without X11 forwarding), then:
echo DROPBOX_USERS="<insert user name here>Fix file permissions:" > /etc/sysconfig/dropbox.conf
IN USER'S HOME:chmod 0644 /etc/sysconfig/dropbox.conf
wget http://www.dropbox.com/download/?plat=lnx.x86_64
tar -xzvf dropbox*.tar.gz cd .dropbox-dist ./dropboxd # DO NOT HAVE X11 FORWARDING ENABLED when you run dropboxd
The first time it is run, it will ask you to visit a link to activate; copy the URL and visit in a browser on your desktop (doesn’t have to be on the server.) Once activated, in the terminal:
^C to close dropboxd
Edit dropbox.service, and insert the followingcd /lib/systemd/system
[Unit]Description=Dropbox
DaemonAfter=syslog.target network.target nmb.service
[Service]
Type=forking
#PIDFile=/var/run/dropbox.pid
EnvironmentFile=/etc/sysconfig/dropbox.conf
ExecStart=/sbin/runuser -l <USER> -c "~<USER>/.dropbox-dist/dropboxd&"
[Install]
WantedBy=multi-user.target
Enable the service for autostart and start the Dropbox service:
To disable the service:systemctl enable dropbox.servicesystemctl --system daemon-reloadsystemctl status dropbox.service
systemctl start dropbox.servicesystemctl status dropbox.service
systemctl stop dropbox.servicesystemctl disable dropbox.service
No comments :
Post a Comment