Removing the rc.d script from git.

This commit is contained in:
Daniele 2012-11-23 18:56:54 +01:00
parent d0a37ca8d1
commit c160149597
2 changed files with 4 additions and 74 deletions

View File

@ -6,7 +6,7 @@
pkgname=git
pkgver=1.8.0
pkgrel=1
pkgrel=2
pkgdesc="Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency."
arch=('i686' 'x86_64')
url="http://git-scm.com/"
@ -84,6 +84,7 @@ package() {
install -m644 ./contrib/completion/git-prompt.sh "${pkgdir}/usr/share/git/git-prompt.sh"
# more contrib stuff
cp -a ./contrib/* "${pkgdir}/usr/share/git/"
# scripts are for python 2.x
find "${pkgdir}" -name '*.py' \
-exec sed -e 's|#![ ]*/usr/bin/env python|#!/usr/bin/env python2|' -i \{\} \+
@ -107,12 +108,11 @@ package() {
rm -rf "${pkgdir}/usr/lib/perl5"
# git daemon script
install -D -m755 "${srcdir}/git-daemon" "${pkgdir}/etc/rc.d/git-daemon"
install -D -m644 "${srcdir}/git-daemon.conf" "${pkgdir}/etc/conf.d/git-daemon.conf"
# systemd stuff
install -D -m 644 "${srcdir}"/git-daemon@.service "${pkgdir}"/usr/lib/systemd/system/git-daemon@.service
install -D -m 644 "${srcdir}"/git-daemon.socket "${pkgdir}"/usr/lib/systemd/system/git-daemon.socket
install -D -m644 "${srcdir}/git-daemon@.service" "${pkgdir}/usr/lib/systemd/system/git-daemon@.service"
install -D -m644 "${srcdir}/git-daemon.socket" "${pkgdir}/usr/lib/systemd/system/git-daemon.socket"
}
# vim:set ts=2 sw=2 et:

View File

@ -1,70 +0,0 @@
#!/bin/bash
daemon_bin="/usr/lib/git-core/git-daemon"
daemon_name=$(basename $daemon_bin)
PIDF="/var/run/$daemon_name.pid"
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/$daemon_name.conf
get_pid() {
pidof -o %PPID $daemon_name
}
case "$1" in
start)
stat_busy "Starting $daemon_name daemon"
PID=$(get_pid)
if [ -z "$PID" ]; then
[ -f $PIDF ] && rm -f $PIDF
# RUN
$daemon_bin --pid-file=$PIDF $GIT_DAEMON_ARGS
#
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
echo $(get_pid) > $PIDF
add_daemon $daemon_name
stat_done
fi
else
stat_fail
exit 1
fi
;;
stop)
stat_busy "Stopping $daemon_name daemon"
PID=$(get_pid)
# KILL
[ ! -z "$PID" ] && kill $PID &> /dev/null
#
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
rm -f $PIDF &> /dev/null
rm_daemon $daemon_name
stat_done
fi
;;
restart)
$0 stop
sleep 3
$0 start
;;
status)
stat_busy "Checking $daemon_name status";
ck_status $daemon_name
;;
*)
echo "usage: $0 {start|stop|restart|status}"
esac
exit 0