From 5ec17e461bf5639703dde433f73ea25394cb0a3d Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Mon, 10 Oct 2016 19:24:59 +0200 Subject: [PATCH] Add some systemd services --- .config/systemd/user/gpg-agent.service | 12 ++++++++++++ .config/systemd/user/ssh-agent.service | 12 ++++++++++++ .config/systemd/user/tmux.service | 11 +++++++++++ .config/systemd/user/vbox-clipboard.service | 8 ++++++++ 4 files changed, 43 insertions(+) create mode 100644 .config/systemd/user/gpg-agent.service create mode 100644 .config/systemd/user/ssh-agent.service create mode 100644 .config/systemd/user/tmux.service create mode 100644 .config/systemd/user/vbox-clipboard.service diff --git a/.config/systemd/user/gpg-agent.service b/.config/systemd/user/gpg-agent.service new file mode 100644 index 0000000..3914f68 --- /dev/null +++ b/.config/systemd/user/gpg-agent.service @@ -0,0 +1,12 @@ +[Unit] +Description=GnuPG private key agent +IgnoreOnIsolate=true + +[Service] +Type=forking +ExecStart=/usr/bin/gpg-agent --daemon --homedir=%h/.gnupg +ExecStop=/usr/bin/pkill gpg-agent +Restart=on-abort + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/ssh-agent.service b/.config/systemd/user/ssh-agent.service new file mode 100644 index 0000000..77e41ec --- /dev/null +++ b/.config/systemd/user/ssh-agent.service @@ -0,0 +1,12 @@ +[Unit] +Description=SSH key agent + +[Service] +Type=forking +Environment=SSH_AUTH_SOCK=%h/.ssh/ssh_auth_sock +ExecStartPre=/usr/bin/rm -f $SSH_AUTH_SOCK +ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK + +[Install] +WantedBy=default.target + diff --git a/.config/systemd/user/tmux.service b/.config/systemd/user/tmux.service new file mode 100644 index 0000000..0234a2d --- /dev/null +++ b/.config/systemd/user/tmux.service @@ -0,0 +1,11 @@ +[Unit] +Description=Start tmux in detached session + +[Service] +Type=forking +User=%I +ExecStart=/usr/bin/tmux new-session -s %u -d +ExecStop=/usr/bin/tmux kill-session -t %u + +[Install] +WantedBy=multi-user.target diff --git a/.config/systemd/user/vbox-clipboard.service b/.config/systemd/user/vbox-clipboard.service new file mode 100644 index 0000000..6cdd8bd --- /dev/null +++ b/.config/systemd/user/vbox-clipboard.service @@ -0,0 +1,8 @@ +[Unit] +Description=Start VirtualBox clipboard service + +[Service] +ExecStart=/usr/bin/VBoxClient --nodaemon --clipboard + +[Install] +WantedBy=multi-user.target