Move systemd-units to public dotfiles

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-12-12 00:16:30 +01:00
parent af95335564
commit 18c2bb3223
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E
6 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,7 @@
[Unit]
Description=Refresh images and update containers
[Service]
Type=oneshot
ExecStart=/bin/systemctl --user reload-or-restart docker-compose.service

View File

@ -0,0 +1,9 @@
[Unit]
Description=Refresh images and update containers
After=docker-compose.service
[Timer]
OnCalendar=*:0/15
[Install]
WantedBy=timers.target

View File

@ -0,0 +1,19 @@
[Unit]
Description=Docker Compose container starter
[Service]
WorkingDirectory=/home/luzifer/.config
Type=oneshot
RemainAfterExit=yes
Environment=DOCKER_HOST=http+unix://var/run/docker.sock
ExecStartPre=/usr/bin/docker-compose pull --quiet --ignore-pull-failures
ExecStart=/usr/bin/docker-compose up -d --remove-orphans
ExecStop=/usr/bin/docker-compose stop
ExecReload=/usr/bin/docker-compose pull --quiet --parallel --ignore-pull-failures
ExecReload=/usr/bin/docker-compose up -d --remove-orphans
[Install]
WantedBy=default.target

View File

@ -0,0 +1,12 @@
[Unit]
Description=Dropbox
[Service]
Type=simple
ExecStart=/home/luzifer/.dropbox-dist/dropboxd
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
[Install]
WantedBy=default.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=ngrok port forwarding
[Service]
TimeoutStartSec=0
TimeoutStopSec=0
Restart=on-failure
RestartSec=5
ExecStartPre=/bin/bash -c 'if ! [ -e /home/luzifer/.bin/ngrok ]; then mkdir -p /home/luzifer/.bin && curl -sSLo /tmp/ngrok.zip https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip && unzip -q /tmp/ngrok.zip -d /home/luzifer/.bin && rm /tmp/ngrok.zip; fi'
ExecStart=/home/luzifer/.bin/ngrok start --none
[Install]
WantedBy=default.target

View File

@ -0,0 +1,5 @@
[Service]
ExecStart=/usr/bin/ssh-agent -D -a "${HOME}/.ssh/ssh_auth_sock"
[Install]
WantedBy=default.target