add pullscripts (test mode)

This commit is contained in:
vvzvlad 2023-04-16 23:06:06 +07:00
parent a91f3a9989
commit 99e8927afd
3 changed files with 25 additions and 0 deletions

9
files/pullgit.service Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Pull git changes
[Service]
Type=oneshot
ExecStart=/usr/local/bin/pullgit.sh
[Install]
WantedBy=multi-user.target

6
files/pullgit.sh Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env sh
git config --global user.name vestasync_wb_$(hostname)
git config --global user.email "vestasync@fake.mail"
cd /mnt/data/etc/
git fetch > /dev/null 2>&1 || true
git pull > /dev/null 2>&1 || true

10
files/pullgit.timer Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=Run pullgit.service every 10 min
[Timer]
OnCalendar=*:0/10
Persistent=true
Unit=pullgit.service
[Install]
WantedBy=timers.target