add upstream source (adch++ 2.12.1 from sourceforge)

This commit is contained in:
2020-03-22 01:45:29 -07:00
parent 3574617350
commit 2cfbcf1301
9637 changed files with 1934407 additions and 0 deletions

97
src/redhat/etc/init.d/adchppd Executable file
View File

@@ -0,0 +1,97 @@
#!/bin/sh
#
# chkconfig: - 91 35
# description: Starts and stops the ADCH++ ( https://launchpad.net/adchpp ) daemons on RHEL\CentOS \
# used to provide p2p network services.
#
# pidfile: /var/run/adchpp.pid
# config: /etc/adchpp/adchpp.xml
# Source function library.
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 1
fi
# Source networking configuration.
. /etc/sysconfig/network
if [ -f /etc/sysconfig/adchpp ]; then
. /etc/sysconfig/adchpp
fi
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1
# Check that uhub.conf exists.
[ -f /etc/adchpp/adchpp.xml ] || exit 6
RETVAL=0
start() {
KIND="ADCH++"
echo -n $"Starting $KIND services: "
daemon adchppd $ADCHPPOPTIONS
RETVAL=$?
echo ""
return $RETVAL
}
stop() {
KIND="ADCH++"
echo -n $"Shutting down $KIND services: "
killproc adchppd
RETVAL=$?
echo ""
return $RETVAL
}
restart() {
stop
start
}
rhstatus() {
status adchpp
RETVAL=$?
if [ $RETVAL -ne 0 ] ; then
return $RETVAL
fi
}
# Allow status as non-root.
if [ "$1" = status ]; then
rhstatus
exit $?
fi
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
rhstatus
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 2
esac
exit $?

View File

@@ -0,0 +1,7 @@
# Usage: adchpp [[-c <configdir>] [-d]] | [-v] | [-h]
# -c <configdir>
# -v show version and exit
# -d run in daemon mode
# -h show help
ADCHPPOPTIONS="-d -c /etc/adchpp"