1
0
mirror of https://github.com/shimunn/gitredditor.git synced 2023-11-17 18:42:43 +01:00
gitredditor/gitedditor.service
2019-05-13 22:05:59 +02:00

27 lines
758 B
Desktop File

[Unit]
Description=Mirrors reddit comments into a git repo
After=network-online.target
[Service]
#Default Environment=GITREDDITOR_CNT=20
#Default Environment=GITREDDITOR_TH=5
#Default Environment=GITREDDITOR_THP=5
Environment=GITREDDITOR_U=root
Environment=ROOT_DIR=/srv/reddit
RestartSec=7200
Restart=always
ExecStartPre=/bin/bash -c "cd ${ROOT_DIR}/${GITREDDITOR_U} && /usr/bin/git pull"
ExecStart=/usr/bin/rkt --insecure-options=image run --inherit-env --dns 8.8.8.8 --volume volume-repo,kind=host,source=${ROOT_DIR}/${GITREDDITOR_U} \
docker://repo.shimun.net/shimun/gitredditor
ExecStopPost=/bin/bash -c "cd ${ROOT_DIR}/${GITREDDITOR_U} && /usr/bin/git push"
[Install]
WantedBy=multi-user.target