Browse Source

Improved hybserv

Bob Mottram 11 years ago
parent
commit
87928034be
1 changed files with 21 additions and 191 deletions
  1. 21
    191
      beaglebone.txt

+ 21
- 191
beaglebone.txt View File

@@ -1231,13 +1231,13 @@ Now visit the URL of your site and you should be taken through the rest of the i
1231 1231
 
1232 1232
 Install the poller.
1233 1233
 
1234
-#+BEGIN_SRC
1234
+#+BEGIN_SRC: bash
1235 1235
 emacs /etc/crontab
1236 1236
 #+END_SRC
1237 1237
 
1238 1238
 and append the following, changing mydomainname.com to whatever your domain is.
1239 1239
 
1240
-#+BEGIN_SRC
1240
+#+BEGIN_SRC: bash
1241 1241
 */10 *  * * *	root	cd /var/www/mydomainname.com/htdocs; /usr/bin/php include/poller.php
1242 1242
 #+END_SRC
1243 1243
 
@@ -1707,7 +1707,7 @@ TODO
1707 1707
 
1708 1708
 CSipSimple?
1709 1709
 ** Install an IRC server
1710
-*** Basic install
1710
+*** Base install
1711 1711
 
1712 1712
 IRC is not an especially secure system.  For instance, even with the best encryption it's easily possible to imagine IRC-specific cribs which could be used by cryptanalytic systems.  However, we'll try to implement it in a manner which will at least give the surveillance aparatus something to ponder over.
1713 1713
 
@@ -1777,26 +1777,26 @@ Ensure that the configuration is only readable by the root user.
1777 1777
 chmod 600 /etc/ircd-hybrid/ircd.conf
1778 1778
 #+END_SRC
1779 1779
 
1780
+*** Channel management
1781
+
1780 1782
 To to install channel management tools.
1781 1783
 
1782 1784
 #+BEGIN_SRC: bash
1783 1785
 cd /tmp
1784
-wget http://freedombone.uk.to/hybserv2.tar.gz
1786
+wget http://freedombone.uk.to/hybserv_1.9.4-1_armhf.deb
1785 1787
 #+END_SRC
1786 1788
 
1787 1789
 Verify it.
1788 1790
 
1789 1791
 #+BEGIN_SRC: bash
1790
-md5sum hybserv2.tar.gz
1791
-12efc53c421f4919f11328e48dbc519d  hybserv2.tar.gz
1792
+md5sum hybserv_1.9.4-1_armhf.deb
1793
+5b66551ceabb679bdeda1859d23ca6ac  hybserv_1.9.4-1_armhf.deb
1792 1794
 #+END_SRC
1793 1795
 
1794 1796
 Install it.
1795 1797
 
1796 1798
 #+BEGIN_SRC: bash
1797
-tar -xzvf hybserv2.tar.gz
1798
-cd hybserv2-*
1799
-./install.fast
1799
+dpkg -i hybserv_1.9.4-1_armhf.deb
1800 1800
 #+END_SRC
1801 1801
 
1802 1802
 Edit the configuration.
@@ -1822,199 +1822,25 @@ Enter the md5 password which you previously created within the /operator/ sectio
1822 1822
 Then save and exit.
1823 1823
 
1824 1824
 #+BEGIN_SRC: bash
1825
-emacs /usr/local/hybserv/hybserv.conf
1825
+emacs /etc/hybserv/hybserv.conf
1826 1826
 #+END_SRC
1827 1827
 
1828
-Change #MD5 PASSWORD HERE# to the md5 operator password created earlier:
1828
+Change #MD5 PASSWORD HERE# to the md5 operator password created earlier, mydomainname.com to your domain name and mysendacceptpassword to the send/accept password specified within /ircd.conf/.
1829 1829
 
1830 1830
 #+BEGIN_SRC: bash
1831
-O:*@*:#MD5 PASSWORD HERE#:root:segj (comment out other Q: lines)
1832 1831
 A:mynickname <myemailaddress>
1833
-N:mydomainname.com:Hybrid services
1834
-S:ConnectPassword:192.168.1.60:6667 (remove the other two services)
1835
-#+END_SRC
1836
-
1837
-Save and exit.
1838
-
1839
-Create a daemon for hybserv2.
1840
-
1841
-#+BEGIN_SRC: bash
1842
-emacs /etc/init.d/hybserv2
1843
-#+END_SRC
1844
-
1845
-Enter the following, replacing /myusername/ with your username.
1846
-
1847
-#+BEGIN_SRC: bash
1848
-#! /bin/sh
1849
-### BEGIN INIT INFO
1850
-# Provides:          hybserv
1851
-# Required-Start:    $remote_fs $syslog
1852
-# Required-Stop:     $remote_fs $syslog
1853
-# Default-Start:     2 3 4 5
1854
-# Default-Stop:      0 1 6
1855
-# Short-Description: Hybserv2 daemon
1856
-# Description:       Hybserv2 daemon
1857
-### END INIT INFO
1858
-
1859
-# Do NOT "set -e"
1860
-
1861
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
1862
-PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/hybserv
1863
-DESC="Hybserv2 daemon"
1864
-NAME=hybserv
1865
-DAEMON=/usr/local/hybserv/$NAME
1866
-DAEMON_ARGS=""
1867
-PIDFILE=/var/run/ircd/$NAME.pid
1868
-SCRIPTNAME=/etc/init.d/$NAME
1869
-UID=myusername
1870
-GID=myusername
1871
-
1872
-# Exit if the package is not installed
1873
-[ -x "$DAEMON" ] || exit 0
1874
-
1875
-# Read configuration variable file if it is present
1876
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
1877
-
1878
-# Load the VERBOSE setting and other rcS variables
1879
-. /lib/init/vars.sh
1880
-
1881
-# Define LSB log_* functions.
1882
-# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
1883
-# and status_of_proc is working.
1884
-. /lib/lsb/init-functions
1885
-
1886
-#
1887
-# Function that starts the daemon/service
1888
-#
1889
-do_start()
1890
-{
1891
-	# Return
1892
-	#   0 if daemon has been started
1893
-	#   1 if daemon was already running
1894
-	#   2 if daemon could not be started
1895
-	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid $UID:$GID --test > /dev/null \
1896
-		|| return 1
1897
-	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid $UID:$GID -- \
1898
-		$DAEMON_ARGS \
1899
-		|| return 2
1900
-	# Add code here, if necessary, that waits for the process to be ready
1901
-	# to handle requests from services started subsequently which depend
1902
-	# on this one.  As a last resort, sleep for some time.
1903
-}
1904
-
1905
-#
1906
-# Function that stops the daemon/service
1907
-#
1908
-do_stop()
1909
-{
1910
-	# Return
1911
-	#   0 if daemon has been stopped
1912
-	#   1 if daemon was already stopped
1913
-	#   2 if daemon could not be stopped
1914
-	#   other if a failure occurred
1915
-	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
1916
-	RETVAL="$?"
1917
-	[ "$RETVAL" = 2 ] && return 2
1918
-	# Wait for children to finish too if this is a daemon that forks
1919
-	# and if the daemon is only ever run from this initscript.
1920
-	# If the above conditions are not satisfied then add some other code
1921
-	# that waits for the process to drop all resources that could be
1922
-	# needed by services started subsequently.  A last resort is to
1923
-	# sleep for some time.
1924
-	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
1925
-	[ "$?" = 2 ] && return 2
1926
-	# Many daemons don't delete their pidfiles when they exit.
1927
-	rm -f $PIDFILE
1928
-	return "$RETVAL"
1929
-}
1930
-
1931
-#
1932
-# Function that sends a SIGHUP to the daemon/service
1933
-#
1934
-do_reload() {
1935
-	#
1936
-	# If the daemon can reload its configuration without
1937
-	# restarting (for example, when it is sent a SIGHUP),
1938
-	# then implement that here.
1939
-	#
1940
-	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
1941
-	return 0
1942
-}
1943
-
1944
-case "$1" in
1945
-  start)
1946
-	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
1947
-	do_start
1948
-	case "$?" in
1949
-		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
1950
-		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
1951
-	esac
1952
-	;;
1953
-  stop)
1954
-	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
1955
-	do_stop
1956
-	case "$?" in
1957
-		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
1958
-		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
1959
-	esac
1960
-	;;
1961
-  status)
1962
-	status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
1963
-	;;
1964
-  #reload|force-reload)
1965
-	#
1966
-	# If do_reload() is not implemented then leave this commented out
1967
-	# and leave 'force-reload' as an alias for 'restart'.
1968
-	#
1969
-	#log_daemon_msg "Reloading $DESC" "$NAME"
1970
-	#do_reload
1971
-	#log_end_msg $?
1972
-	#;;
1973
-  restart|force-reload)
1974
-	#
1975
-	# If the "reload" option is implemented then remove the
1976
-	# 'force-reload' alias
1977
-	#
1978
-	log_daemon_msg "Restarting $DESC" "$NAME"
1979
-	do_stop
1980
-	case "$?" in
1981
-	  0|1)
1982
-		do_start
1983
-		case "$?" in
1984
-			0) log_end_msg 0 ;;
1985
-			1) log_end_msg 1 ;; # Old process is still running
1986
-			*) log_end_msg 1 ;; # Failed to start
1987
-		esac
1988
-		;;
1989
-	  *)
1990
-		# Failed to stop
1991
-		log_end_msg 1
1992
-		;;
1993
-	esac
1994
-	;;
1995
-  *)
1996
-	#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
1997
-	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
1998
-	exit 3
1999
-	;;
2000
-esac
2001
-
2002
-:
1832
+N:irc.mydomainname.com:Hybrid services
1833
+O:*@*:#MD5 PASSWORD HERE#:root:segj (comment out other Q: lines)
1834
+S:mysendacceptpassword:192.168.1.60:6670 (remove the other two services)
2003 1835
 #+END_SRC
2004 1836
 
2005
-Save and exit, then initialise the daemon, replacing /myusername/ with your username.
2006
-
2007
-#+BEGIN_SRC: bash
2008
-chown -R myusername:myusername /usr/local/hybserv
2009
-chmod u+x /etc/init.d/hybserv
2010
-update-rc.d hybserv defaults
2011
-#+END_SRC
1837
+Also remove the line *#NOT-EDITED#*, then save and exit.
2012 1838
 
2013 1839
 Now we need to restart the ircd and hybrid server to make things work:
2014 1840
 
2015 1841
 #+BEGIN_SRC: bash
2016 1842
 service ircd-hybrid restart
2017
-service hybserv restart
1843
+service hybserv start
2018 1844
 #+END_SRC
2019 1845
 
2020 1846
 *** Usage
@@ -2033,6 +1859,10 @@ Connect to the IRC and identify yourself as an operator.  Here /mynetwork/ shoul
2033 1859
 
2034 1860
 /connect mydomainname.com
2035 1861
 
1862
+/channel add -auto #mychannel mynetwork channelpassword
1863
+
1864
+/network add -nick mynick mychannel
1865
+
2036 1866
 /join #mychannel
2037 1867
 
2038 1868
 /msg -servername chanserv REGISTER #mychannel channelpassword
@@ -2256,7 +2086,7 @@ esac
2256 2086
 Save and exit.  Then start the gopher service.
2257 2087
 
2258 2088
 #+BEGIN_SRC: bash
2259
-chmod u+x /etc/init.d/gopher
2089
+chmod +x /etc/init.d/gopher
2260 2090
 update-rc.d gopher defaults
2261 2091
 service gopher start
2262 2092
 #+END_SRC