* update .gitignore
* update uhub.spec for plugins system * update example plugins.conf * modify header RH init script
This commit is contained in:
		
							parent
							
								
									55ffe46a38
								
							
						
					
					
						commit
						7c1e38602c
					
				
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -2,7 +2,8 @@
 | 
				
			|||||||
*.[oa]
 | 
					*.[oa]
 | 
				
			||||||
*.exe
 | 
					*.exe
 | 
				
			||||||
*.gch
 | 
					*.gch
 | 
				
			||||||
 | 
					*.so
 | 
				
			||||||
uhub-admin
 | 
					uhub-admin
 | 
				
			||||||
adcrush
 | 
					adcrush
 | 
				
			||||||
uhub
 | 
					uhub
 | 
				
			||||||
 | 
					revision.*
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/bin/sh
 | 
					#!/bin/sh
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# chkconfig: - 91 35
 | 
					# chkconfig: - 91 35
 | 
				
			||||||
# description: Starts and stops the Uhub ( http://www.extatic.org/uhub ) daemons on RHEL\CentOS \
 | 
					# description: Starts and stops the Uhub ( http://www.uhub.org ) daemons on RHEL\CentOS \
 | 
				
			||||||
#	       used to provide p2p network services.
 | 
					#	       used to provide p2p network services.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# pidfile: /var/run/uhub.pid
 | 
					# pidfile: /var/run/uhub.pid
 | 
				
			||||||
@ -69,12 +69,12 @@ reload() {
 | 
				
			|||||||
}	
 | 
					}	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rhstatus() {
 | 
					rhstatus() {
 | 
				
			||||||
	status uhub                                                                                                                                                   
 | 
						status uhub
 | 
				
			||||||
        RETVAL=$?                                                                                                                                                     
 | 
					        RETVAL=$?
 | 
				
			||||||
        if [ $RETVAL -ne 0 ] ; then                                                                                                                                   
 | 
					        if [ $RETVAL -ne 0 ] ; then
 | 
				
			||||||
                return $RETVAL                                                                                                                                        
 | 
					                return $RETVAL
 | 
				
			||||||
        fi                                                                                                                                                            
 | 
					        fi
 | 
				
			||||||
}                 
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
case "$1" in
 | 
					case "$1" in
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,12 @@
 | 
				
			|||||||
 | 
					# auth user
 | 
				
			||||||
 | 
					# file={path for DB file with user auth information}
 | 
				
			||||||
 | 
					plugin /var/lib/uhub/mod_auth_sqlite.so "file=/etc/uhub/users.db"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					plugin /var/lib/uhub/mod_logging.so
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# plugin /var/lib/uhub/mod_auth_simple.so
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# plugin /var/lib/uhub/mod_example.so
 | 
				
			||||||
@ -49,6 +49,8 @@ file_motd=/etc/uhub/motd.txt
 | 
				
			|||||||
# Normally this message is sent to clients when write in chat !rules
 | 
					# Normally this message is sent to clients when write in chat !rules
 | 
				
			||||||
file_rules=/etc/uhub/rules.txt
 | 
					file_rules=/etc/uhub/rules.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# This file can contain a conf for plugin subsystem
 | 
				
			||||||
 | 
					file_plugins = /etc/uhub/plugins.conf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Slots/share/hubs limits
 | 
					# Slots/share/hubs limits
 | 
				
			||||||
limit_max_hubs_user = 0
 | 
					limit_max_hubs_user = 0
 | 
				
			||||||
 | 
				
			|||||||
@ -1,13 +1,14 @@
 | 
				
			|||||||
Summary: High performance ADC p2p hub.
 | 
					Summary: High performance ADC p2p hub.
 | 
				
			||||||
Name: uhub
 | 
					Name: uhub
 | 
				
			||||||
Version: 0.3.2
 | 
					Version: 0.4.0
 | 
				
			||||||
Release: 3
 | 
					Release: 1
 | 
				
			||||||
License: GPLv3
 | 
					License: GPLv3
 | 
				
			||||||
Group: Networking/File transfer
 | 
					Group: Networking/File transfer
 | 
				
			||||||
Source: uhub-%{version}.tar.gz
 | 
					Source: uhub-%{version}.tar.gz
 | 
				
			||||||
URL: http://www.uhub.org
 | 
					URL: http://www.uhub.org
 | 
				
			||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 | 
					BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BuildRequires: sqlite-devel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%description
 | 
					%description
 | 
				
			||||||
uhub is a high performance peer-to-peer hub for the ADC network.
 | 
					uhub is a high performance peer-to-peer hub for the ADC network.
 | 
				
			||||||
@ -20,7 +21,7 @@ Key features:
 | 
				
			|||||||
- Experimental SSL support (optional)
 | 
					- Experimental SSL support (optional)
 | 
				
			||||||
- Advanced access control support
 | 
					- Advanced access control support
 | 
				
			||||||
- Easy configuration
 | 
					- Easy configuration
 | 
				
			||||||
 | 
					- plugin support
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%prep
 | 
					%prep
 | 
				
			||||||
%setup -q -n %{name}-%{version}
 | 
					%setup -q -n %{name}-%{version}
 | 
				
			||||||
@ -36,15 +37,17 @@ mkdir -p $RPM_BUILD_ROOT/etc/init.d
 | 
				
			|||||||
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
 | 
					mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
 | 
				
			||||||
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
 | 
					mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
 | 
				
			||||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
 | 
					mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1
 | 
				
			||||||
 | 
					mkdir -p $RPM_BUILD_ROOT/var/lib/uhub
 | 
				
			||||||
 | 
					
 | 
				
			||||||
install uhub $RPM_BUILD_ROOT/usr/bin/
 | 
					install uhub $RPM_BUILD_ROOT/usr/bin/
 | 
				
			||||||
> doc/motd.txt
 | 
					> doc/motd.txt
 | 
				
			||||||
install -m644 doc/uhub.conf doc/users.conf doc/rules.txt doc/motd.txt $RPM_BUILD_ROOT/etc/uhub
 | 
					install -m644 doc/uhub.conf doc/users.conf doc/rules.txt doc/motd.txt doc/plugins.conf $RPM_BUILD_ROOT/etc/uhub
 | 
				
			||||||
install doc/init.d.RedHat/etc/init.d/uhub $RPM_BUILD_ROOT/etc/init.d
 | 
					install doc/init.d.RedHat/etc/init.d/uhub $RPM_BUILD_ROOT/etc/init.d
 | 
				
			||||||
install -m644 doc/init.d.RedHat/etc/sysconfig/uhub  $RPM_BUILD_ROOT/etc/sysconfig/
 | 
					install -m644 doc/init.d.RedHat/etc/sysconfig/uhub  $RPM_BUILD_ROOT/etc/sysconfig/
 | 
				
			||||||
install -m644 doc/init.d.RedHat/etc/logrotate.d/uhub $RPM_BUILD_ROOT/etc/logrotate.d/
 | 
					install -m644 doc/init.d.RedHat/etc/logrotate.d/uhub $RPM_BUILD_ROOT/etc/logrotate.d/
 | 
				
			||||||
/bin/gzip -9c doc/uhub.1 > doc/uhub.1.gz &&
 | 
					/bin/gzip -9c doc/uhub.1 > doc/uhub.1.gz &&
 | 
				
			||||||
install -m644 doc/uhub.1.gz $RPM_BUILD_ROOT/usr/share/man/man1
 | 
					install -m644 doc/uhub.1.gz $RPM_BUILD_ROOT/usr/share/man/man1
 | 
				
			||||||
 | 
					install -m644 mod_*.so $RPM_BUILD_ROOT/var/lib/uhub
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%files
 | 
					%files
 | 
				
			||||||
@ -55,12 +58,13 @@ install -m644 doc/uhub.1.gz $RPM_BUILD_ROOT/usr/share/man/man1
 | 
				
			|||||||
%config(noreplace) %{_sysconfdir}/uhub/users.conf
 | 
					%config(noreplace) %{_sysconfdir}/uhub/users.conf
 | 
				
			||||||
%config(noreplace) %{_sysconfdir}/uhub/motd.txt
 | 
					%config(noreplace) %{_sysconfdir}/uhub/motd.txt
 | 
				
			||||||
%config(noreplace) %{_sysconfdir}/uhub/rules.txt
 | 
					%config(noreplace) %{_sysconfdir}/uhub/rules.txt
 | 
				
			||||||
 | 
					%config(noreplace) %{_sysconfdir}/uhub/plugins.conf
 | 
				
			||||||
%{_sysconfdir}/init.d/uhub
 | 
					%{_sysconfdir}/init.d/uhub
 | 
				
			||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/uhub
 | 
					%config(noreplace) %{_sysconfdir}/logrotate.d/uhub
 | 
				
			||||||
%config(noreplace) %{_sysconfdir}/sysconfig/uhub
 | 
					%config(noreplace) %{_sysconfdir}/sysconfig/uhub
 | 
				
			||||||
/usr/share/man/man1/uhub.1.gz
 | 
					/usr/share/man/man1/uhub.1.gz
 | 
				
			||||||
%{_bindir}/uhub
 | 
					%{_bindir}/uhub
 | 
				
			||||||
 | 
					%{_libdir}/uhub/mod_*.so
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%clean
 | 
					%clean
 | 
				
			||||||
rm -rf $RPM_BUILD_ROOT
 | 
					rm -rf $RPM_BUILD_ROOT
 | 
				
			||||||
@ -74,6 +78,8 @@ fi
 | 
				
			|||||||
/usr/sbin/adduser -M -d /tmp -G nobody -s /sbin/nologin -c 'The Uhub ADC p2p hub Daemon' uhub >/dev/null 2>&1 ||:
 | 
					/usr/sbin/adduser -M -d /tmp -G nobody -s /sbin/nologin -c 'The Uhub ADC p2p hub Daemon' uhub >/dev/null 2>&1 ||:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%changelog
 | 
					%changelog
 | 
				
			||||||
 | 
					* Tue Jun 26 2001 E_zombie
 | 
				
			||||||
 | 
					- add plugins.conf
 | 
				
			||||||
* Tue Jan 31 2010 E_zombie
 | 
					* Tue Jan 31 2010 E_zombie
 | 
				
			||||||
- change GROUP
 | 
					- change GROUP
 | 
				
			||||||
- chmod for files
 | 
					- chmod for files
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user