https://github.com/victorb/sympersister
Tiny local service for making sure symlinks always works
https://github.com/victorb/sympersister
Last synced: 4 months ago
JSON representation
Tiny local service for making sure symlinks always works
- Host: GitHub
- URL: https://github.com/victorb/sympersister
- Owner: victorb
- License: mit
- Created: 2018-01-30T17:17:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-30T17:20:31.000Z (over 8 years ago)
- Last Synced: 2025-02-22T04:14:32.700Z (over 1 year ago)
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sympersister
Tiny local service for making sure symlinks always works
## Usage
put in systemd somewhere, call `sumpersister`
Have a config file in `$HOME/.sumpersister/config.json`
```
{
"/home/user/.zshrc": "/keybase/diggan/private/.zshrc"
}
```
With that config, a symlink will be created to point the value to the key. So when the value changes, key gets updated.
However, once every minute or so, sympersister will copy value to $CACHE so in reality, the symlink is actually pointing to the cache location instead. So if value is not online (like keybase disconnected or you're offline), the symlink will still work. When you get online again, the symlink will point directly to key and work normally again