Skip to content

Instantly share code, notes, and snippets.

@luk4hn
Last active October 19, 2022 15:50
Show Gist options
  • Save luk4hn/cddcf6c3019d09ab31b234c969213c8c to your computer and use it in GitHub Desktop.
Save luk4hn/cddcf6c3019d09ab31b234c969213c8c to your computer and use it in GitHub Desktop.
install dropbox for local user
#!/bin/bash
# this installs dropboxd to ~/.dropbox-dist
cd $HOME && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
mkdir -p "$HOME/.config/systemd/user"
cat << EOF > "${HOME}/.config/systemd/user/dropbox.service"
[Unit]
Description=dropbox agent
After=local-fs.target network.target
[Service]
ExecStart=/usr/bin/env %h/.dropbox-dist/dropboxd
ExecStop=/usr/bin/env %h/.local/bin/dropbox stop
Type=simple
Restart=on-failure
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable --now dropbox.service
systemctl --user status dropbox.service
mkdir -p $HOME/.local/bin
curl -sSL -o $HOME/.local/bin/dropbox https://linux.dropbox.com/packages/dropbox.py
chmod +x $HOME/.local/bin/dropbox
dropbox status
# https://wiki.archlinux.org/title/dropbox#Setup_EncFS_with_Dropbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment