forked from Grive/grive
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify where to invoke systemctl, provide example #322
Open
mdeguzis
wants to merge
1
commit into
vitalif:master
Choose a base branch
from
mdeguzis:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,16 +86,56 @@ directory (in this case the `$HOME/google-drive`): | |
First install the `inotify-tools` (seems to be named like that in all major distros): | ||
test that it works by calling `inotifywait -h`. | ||
|
||
Prepare a Google Drive folder in your $HOME directory with `grive -a`. | ||
Ensure you have first initialized a Google Drive folder per the instructions in the usage section. | ||
Execute these commands from the directory above the folder you are using. In the example below, | ||
`google-drive` was initialized inside the user `$HOME` directory. | ||
|
||
```bash | ||
# 'google-drive' is the name of your Google Drive folder in your $HOME directory | ||
systemctl --user enable grive-timer@$(systemd-escape google-drive).timer | ||
systemctl --user start grive-timer@$(systemd-escape google-drive).timer | ||
systemctl --user enable grive-changes@$(systemd-escape google-drive).service | ||
systemctl --user start grive-changes@$(systemd-escape google-drive).service | ||
``` | ||
|
||
For example: | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't there a nice tutorial this can link to? It's basically explaining how |
||
$ systemctl --user enable grive-timer@$(systemd-escape google-drive).timer | ||
Created symlink /home/<user>/.config/systemd/user/timers.target.wants/grive-timer@google\x2ddrive.timer → /usr/lib/systemd/user/[email protected]. | ||
$ systemctl --user start grive-timer@$(systemd-escape google-drive).timer | ||
$ systemctl --user enable grive-changes@$(systemd-escape google-drive).service | ||
Created symlink /home/<user>/.config/systemd/user/default.target.wants/grive-changes@google\x2ddrive.service → /usr/lib/systemd/user/[email protected]. | ||
$ systemctl --user start grive-changes@$(systemd-escape google-drive).service | ||
``` | ||
|
||
You can check the status of these services as so: | ||
``` | ||
$ systemctl --user status grive-timer@$(systemd-escape google-drive).timer | ||
● grive-timer@google\x2ddrive.timer - Google drive sync (fixed intervals) | ||
Loaded: loaded (/usr/lib/systemd/user/[email protected]; enabled; vendor preset: enabled) | ||
Active: active (running) since Sun 2020-09-06 13:16:33 EDT; 9min ago | ||
Trigger: n/a | ||
Triggers: ● grive-timer@google\x2ddrive.service | ||
|
||
$ systemctl --user status grive-timer@$(systemd-escape google-drive).service | ||
● grive-timer@google\x2ddrive.service - Google drive sync | ||
Loaded: loaded (/usr/lib/systemd/user/[email protected]; static; vendor preset: enabled) | ||
Active: active (running) since Sun 2020-09-06 13:16:33 EDT; 10min ago | ||
TriggeredBy: ● grive-timer@google\x2ddrive.timer | ||
Main PID: 124255 (grive-sync.sh) | ||
Memory: 3.0G | ||
CGroup: /user.slice/user-1000.slice/[email protected]/grive\x2dtimer.slice/grive-timer@google\> | ||
├─124255 /bin/bash /usr/lib/grive/grive-sync.sh sync google\x2ddrive | ||
├─124295 grive -p google-drive | ||
└─124296 grep -v -E ^Reading local directories$|^Reading remote server file list$|^Syn> | ||
|
||
Sep 06 13:26:59 pop-os grive-sync.sh[124296]: sync "somefolder/somepath" | ||
``` | ||
|
||
Tail the service unit to gauge the current activity: | ||
``` | ||
journalctl --user -f -u grive-timer@$(systemd-escape google-drive).service | ||
``` | ||
|
||
You can enable and start these two units for multiple folders in your `$HOME` | ||
directory if you need to sync with multiple google accounts. | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it should not matter where you execute these commands in.