diff options
Diffstat (limited to 'extra/kde-agent')
-rw-r--r-- | extra/kde-agent/PKGBUILD | 20 | ||||
-rw-r--r-- | extra/kde-agent/agent-shutdown.sh | 13 | ||||
-rw-r--r-- | extra/kde-agent/agent-startup.sh | 19 |
3 files changed, 52 insertions, 0 deletions
diff --git a/extra/kde-agent/PKGBUILD b/extra/kde-agent/PKGBUILD new file mode 100644 index 000000000..f2cd14dfd --- /dev/null +++ b/extra/kde-agent/PKGBUILD @@ -0,0 +1,20 @@ +# $Id: PKGBUILD 48318 2009-08-01 13:49:37Z tpowa $ +# Maintainer: Tobias Powalowski <tpowa@archlinux.org> + +pkgname=kde-agent +pkgver=20090801 +pkgrel=2 +pkgdesc="Startup and shutdown scripts for gpg-agent and ssh-agent in KDE" +arch=('i686' 'x86_64') +url='http://www.kde.org' +license=('GPL' 'LGPL' 'FDL') +depends=('pinentry' 'openssh' 'qt') +source=(agent-startup.sh + agent-shutdown.sh) + +build() { + install -D -m 755 $srcdir/agent-startup.sh $pkgdir/etc/kde/env/agent-startup.sh + install -D -m 755 $srcdir/agent-shutdown.sh $pkgdir/etc/kde/shutdown/agent-shutdown.sh +} +md5sums=('7daec96c125e1e238a35f31ea4a476f0' + '18e8d01124b19f7df2937c06e177bf7f') diff --git a/extra/kde-agent/agent-shutdown.sh b/extra/kde-agent/agent-shutdown.sh new file mode 100644 index 000000000..71b056af3 --- /dev/null +++ b/extra/kde-agent/agent-shutdown.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# +# This file is executed at kde shutdown. +# Uncomment the following lines to kill the agents +# that were started at session startup. + +if [ "${GPG_AGENT_INFO}" ]; then + kill $(echo ${GPG_AGENT_INFO} | cut -d':' -f 2) >/dev/null 2>&1 +fi +# +if [ "${SSH_AGENT_PID}" ]; then + ssh-agent -k +fi diff --git a/extra/kde-agent/agent-startup.sh b/extra/kde-agent/agent-startup.sh new file mode 100644 index 000000000..0897a237c --- /dev/null +++ b/extra/kde-agent/agent-startup.sh @@ -0,0 +1,19 @@ +# Agents startup file +# +# This file is sourced at kde startup, so that +# the environment variables set here are available +# throughout the session. + +# Uncomment the following lines to start gpg-agent +# and/or ssh-agent at kde startup. +# If you do so, do not forget to uncomment the respective +# lines in KDEDIR/shutdown/agent-shutdown.sh to +# properly kill the agents when the session ends. + +if [ -x /usr/bin/gpg-agent ]; then + eval "$(/usr/bin/gpg-agent --daemon --pinentry-program /usr/bin/pinentry-qt4)" +fi +# +if [ -x /usr/bin/ssh-agent ]; then + eval "$(/usr/bin/ssh-agent -s)" +fi |