yacy
This commit is contained in:
parent
b4e78b9b2c
commit
b37ff901f9
|
@ -0,0 +1,37 @@
|
|||
# Description: p2p merkezi olmayan arama motoru
|
||||
# URL: http://yacy.net/
|
||||
# Packager: milisarge@gmail.com
|
||||
# Depends on: openjdk apache-ant
|
||||
|
||||
name=yacy
|
||||
version=1.82
|
||||
_pkgextraver=20150121_9000
|
||||
release=1
|
||||
|
||||
source=("http://www.yacy.net/release/yacy_v${version}_${_pkgextraver}.tar.gz"
|
||||
yacy.rc yacy-start.sh yacy-stop.sh)
|
||||
|
||||
build() {
|
||||
. /etc/profile.d/apache-ant.sh
|
||||
|
||||
cd "$SRC/$name"
|
||||
ant all
|
||||
cd "$SRC/$name"
|
||||
ant installonlinux -DDESTDIR="$PKG/"
|
||||
install -d "$PKG"/usr/share/java/yacy
|
||||
install -t "$PKG"/usr/share/java/yacy/ lib/*.jar
|
||||
|
||||
install -Dm644 "${SRC}/yacy.rc" "${PKG}/etc/rc.d/init.d/yacy"
|
||||
|
||||
# symlink generated configuration file
|
||||
ln -s /var/cache/yacy/DATA/SETTINGS/yacy.conf $PKG/etc/yacy/yacy.conf
|
||||
|
||||
# install service
|
||||
chown root:yacy $PKG/usr/lib/yacy/startYACY.sh $PKG/usr/lib/yacy/stopYACY.sh
|
||||
chmod 0750 $PKG/usr/lib/yacy/startYACY.sh $PKG/usr/lib/yacy/stopYACY.sh
|
||||
install -d $PKG/usr/sbin
|
||||
install -m 0750 -g yacy $SRC/yacy-start.sh $PKG/usr/sbin/yacy-start
|
||||
install -m 0750 -g yacy $SRC/yacy-stop.sh $PKG/usr/sbin/yacy-stop
|
||||
|
||||
rm -f "$PKG"/etc/yacy "$PKG"/usr/share/yacy/DATA "$PKG"/var/log/yacy
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd /usr/lib/yacy
|
||||
./startYACY.sh
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd /usr/lib/yacy
|
||||
./stopYACY.sh
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/yacy: start/stop yacy daemon
|
||||
#
|
||||
|
||||
# User settings here
|
||||
DAEMON=yacy
|
||||
RUN_AS_USER=yacy
|
||||
# end of user settings
|
||||
|
||||
RETVAL=0
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
echo -n "Starting $DAEMON..."
|
||||
su $RUN_AS_USER -c /usr/sbin/$DAEMON-start &> /dev/null & RETVAL=$?
|
||||
echo " done."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down $DAEMON..."
|
||||
su $RUN_AS_USER -c /usr/sbin/$DAEMON-stop &> /dev/null & RETVAL=$?
|
||||
echo " done."
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 20
|
||||
$0 start
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart]"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
||||
# End of file
|
Loading…
Reference in New Issue