Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=gnometesting.git;a=commitdiff;h=875904394a6bbbb187713697ac1f00b964106f41
commit 875904394a6bbbb187713697ac1f00b964106f41 Author: bouleetbil <bouleet...@frogdev.info> Date: Fri Feb 4 21:42:46 2011 +0100 accountsservice-0.6.3-2-i686 *added systemd/sysvinit support diff --git a/source/lib/accountsservice/FrugalBuild b/source/lib/accountsservice/FrugalBuild index 94a228f..73d5c4d 100644 --- a/source/lib/accountsservice/FrugalBuild +++ b/source/lib/accountsservice/FrugalBuild @@ -3,7 +3,7 @@ pkgname=accountsservice pkgver=0.6.3 -pkgrel=1 +pkgrel=2 pkgdesc="D-Bus interfaces for querying and manipulating user account information" url=http://www.fedoraproject.org/wiki/Features/UserAccountDialog depends=('polkit' 'consolekit') @@ -13,14 +13,16 @@ groups=('lib') archs=('i686' 'x86_64' 'ppc') up2date="Flasttar http://mclasen.fedorapeople.org/accounts/" #source=(http://mclasen.fedorapeople.org/accounts/$pkgname-$pkgver.tar.bz2) -source=(http://cgit.freedesktop.org/accountsservice/snapshot/$pkgname-$pkgver.tar.bz2) -sha1sums=('f695eafe11f75a6f27e1718d0707db1807dc36b6') +source=(http://cgit.freedesktop.org/accountsservice/snapshot/$pkgname-$pkgver.tar.bz2 rc.accounts-daemon) +sha1sums=('f695eafe11f75a6f27e1718d0707db1807dc36b6' \ + '032daff28fd895dc7347b4ca4905ee527a162bc4') build() { Fcd #touch po/Makefile.in.in sh ./autogen.sh || Fdie - Fbuild + Fbuild --with-systemdsystemunitdir=/lib/systemd/system + Frcd2 accounts-daemon } # optimization OK diff --git a/source/lib/accountsservice/accountsservice.install b/source/lib/accountsservice/accountsservice.install new file mode 100644 index 0000000..2225c0c --- /dev/null +++ b/source/lib/accountsservice/accountsservice.install @@ -0,0 +1,31 @@ +post_install() +{ + chkconfig --add rc.accounts-daemon + systemctl daemon-reload >/dev/null 2>&1 + systemctl enable accounts-daemon.service >/dev/null 2>&1 +} + +post_upgrade() +{ + systemctl daemon-reload >/dev/null 2>&1 + systemctl try-restart accounts-daemon.service >/dev/null 2>&1 +} + +pre_remove() +{ + systemctl stop accounts-daemon.service >/dev/null 2>&1 + systemctl disable accounts-daemon.service >/dev/null 2>&1 + chkconfig --del rc.accounts-daemon +} + +post_remove() +{ + systemctl daemon-reload >/dev/null 2>&1 +} + +op=$1 +shift + +$op $* + +# vim: ft=sh diff --git a/source/lib/accountsservice/rc.accounts-daemon b/source/lib/accountsservice/rc.accounts-daemon new file mode 100644 index 0000000..42f7a3b --- /dev/null +++ b/source/lib/accountsservice/rc.accounts-daemon @@ -0,0 +1,41 @@ +#!/bin/bash + +# (c) 2011 bouleetbil <bouleet...@frogdev.info> +# rc.accounts-daemon for FrugalWare +# distributed under GPL License + +# chkconfig: 2345 97 03 +# description: Accounts Service + +source /lib/initscripts/functions +TEXTDOMAIN=accounts-daemon +TEXTDOMAINDIR=/lib/initscripts/messages + +actions=(restart start status stop) +daemon=$"accounts-daemon" + +pid="pidof /usr/libexec/accounts-daemon 2> /dev/null" + +rc_start() +{ + start_msg + if [ -z "$(eval $pid)" ]; then + /usr/libexec/accounts-daemon >/dev/null 2>&1 & + ok $? + else + ok 999 + fi +} + +rc_stop() +{ + stop_msg + if [ ! -z "$(eval $pid)" ] ;then + kill $(eval $pid) 2>/dev/null 1>/dev/null + ok $? + else + ok 999 + fi +} + +rc_exec $1 _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git