diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-18 23:45:05 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-10-18 23:45:05 +0200 |
commit | 809c95a3cf144c1d87b8b365c83d07821204b4d8 (patch) | |
tree | 711233b4ec1c4c2525a7b4a24d2d6da7d33ea38d /.local/bin | |
parent | Update (diff) | |
download | dotfiles-bsd-809c95a3cf144c1d87b8b365c83d07821204b4d8.tar.gz dotfiles-bsd-809c95a3cf144c1d87b8b365c83d07821204b4d8.tar.bz2 dotfiles-bsd-809c95a3cf144c1d87b8b365c83d07821204b4d8.tar.xz dotfiles-bsd-809c95a3cf144c1d87b8b365c83d07821204b4d8.tar.zst dotfiles-bsd-809c95a3cf144c1d87b8b365c83d07821204b4d8.zip |
Added unison cron job
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/ref-unison.pl | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.local/bin/ref-unison.pl b/.local/bin/ref-unison.pl new file mode 100755 index 0000000..680960d --- /dev/null +++ b/.local/bin/ref-unison.pl @@ -0,0 +1,39 @@ +#!/usr/local/bin/perl + +use strict; +use warnings; + +use constant { + UNISON_PATH => '/usr/local/bin/unison', + NOTIFY_SEND_PATH => '/usr/local/bin/notify-send' +}; + +sub main +{ + system( + NOTIFY_SEND_PATH, + 'unison', + '-u', + 'low', + 'Synchronizing files...' + ); + system( + UNISON_PATH, + '-ui', + 'text', + '/usr/home/jozan/.local/share/newsboat/cache.db', + 'ssh://root@jozanleclerc.xyz//root/unison/.local/share/newsboat/cache.db' + ); + system( + UNISON_PATH, + '-ui', + 'text', + '/usr/home/jozan/.abook/addressbook', + 'ssh://root@jozanleclerc.xyz//root/unison/.abook/addressbook' + ); + exit 0; +} + +main(); + +__END__ |