Move systemd-units to public dotfiles
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
af95335564
commit
18c2bb3223
6 changed files with 65 additions and 0 deletions
7
.config/systemd/user/docker-compose-reload.service
Normal file
7
.config/systemd/user/docker-compose-reload.service
Normal 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
|
9
.config/systemd/user/docker-compose-reload.timer
Normal file
9
.config/systemd/user/docker-compose-reload.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Refresh images and update containers
|
||||||
|
After=docker-compose.service
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*:0/15
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
19
.config/systemd/user/docker-compose.service
Normal file
19
.config/systemd/user/docker-compose.service
Normal 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
|
12
.config/systemd/user/dropbox.service
Normal file
12
.config/systemd/user/dropbox.service
Normal 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
|
13
.config/systemd/user/ngrok.service
Normal file
13
.config/systemd/user/ngrok.service
Normal 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
|
5
.config/systemd/user/ssh-agent.service
Normal file
5
.config/systemd/user/ssh-agent.service
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/ssh-agent -D -a "${HOME}/.ssh/ssh_auth_sock"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
Loading…
Reference in a new issue