Passwords are shared using Syncthing
This commit is contained in:
parent
f47592cafd
commit
78110cc71f
@ -19,66 +19,6 @@
|
|||||||
|
|
||||||
https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
|
https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
|
||||||
|
|
||||||
* Pass Git
|
|
||||||
** Service
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :tangle ~/.config/systemd/user/passgit.service
|
|
||||||
:header-args+: :comments both :mkdirp yes
|
|
||||||
:END:
|
|
||||||
|
|
||||||
#+BEGIN_SRC conf
|
|
||||||
[Unit]
|
|
||||||
Description=Sync Passwords every day
|
|
||||||
RefuseManualStart=no
|
|
||||||
RefuseManualStop=yes
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
ExecStart=%h/.local/bin/pass_git_sync
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Timer
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :tangle ~/.config/systemd/user/passgit.timer
|
|
||||||
:header-args+: :comments both :mkdirp yes
|
|
||||||
:END:
|
|
||||||
|
|
||||||
#+BEGIN_SRC conf
|
|
||||||
[Unit]
|
|
||||||
Description=Sync Passwords every day
|
|
||||||
RefuseManualStart=no
|
|
||||||
RefuseManualStop=no
|
|
||||||
Wants=network-online.target
|
|
||||||
After=network-online.target
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
OnCalendar=*-*-* 16:00:00
|
|
||||||
Persistent=true
|
|
||||||
Unit=passgit.service
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Script
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :tangle ~/.local/bin/pass_git_sync
|
|
||||||
:header-args+: :comments both :mkdirp yes
|
|
||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
|
||||||
:END:
|
|
||||||
|
|
||||||
#+begin_src bash
|
|
||||||
cd ~/.local/share/buku/ || exit
|
|
||||||
|
|
||||||
if [[ ! -z $(git status -s bookmarks.db) ]]
|
|
||||||
then
|
|
||||||
git add bookmarks.db
|
|
||||||
git commit -m "Changed bookmarks - $(date +%F)"
|
|
||||||
git push
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Buku Git
|
* Buku Git
|
||||||
** Service
|
** Service
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
|
Loading…
Reference in New Issue
Block a user