|
@@ -1770,7 +1770,255 @@ Within the *auth* section set user = "*@192.168.1.60" - or whatever the fixed IP
|
1770
|
1770
|
Save and exit, then restart the IRC server. Open ports 6666-6670 on your internet router and forward them to the BBB.
|
1771
|
1771
|
|
1772
|
1772
|
#+BEGIN_SRC: bash
|
|
1773
|
+cd /tmp
|
|
1774
|
+wget http://freedombone.uk.to/hybserv2.tar.gz
|
|
1775
|
+#+END_SRC
|
|
1776
|
+
|
|
1777
|
+Verify it.
|
|
1778
|
+
|
|
1779
|
+#+BEGIN_SRC: bash
|
|
1780
|
+md5sum hybserv2.tar.gz
|
|
1781
|
+12efc53c421f4919f11328e48dbc519d hybserv2.tar.gz
|
|
1782
|
+#+END_SRC
|
|
1783
|
+
|
|
1784
|
+Install it.
|
|
1785
|
+
|
|
1786
|
+#+BEGIN_SRC: bash
|
|
1787
|
+tar -xzvf hybserv2.tar.gz
|
|
1788
|
+cd hybserv2-*
|
|
1789
|
+./install.fast
|
|
1790
|
+#+END_SRC
|
|
1791
|
+
|
|
1792
|
+Edit the configuration.
|
|
1793
|
+
|
|
1794
|
+Make a md5 version of the password for the IRC server operator.
|
|
1795
|
+
|
|
1796
|
+#+BEGIN_SRC: bash
|
|
1797
|
+mkpasswd -Hmd5 <operatorpassword>
|
|
1798
|
+#+END_SRC
|
|
1799
|
+
|
|
1800
|
+Edit the ircd-hybrid configuration.
|
|
1801
|
+
|
|
1802
|
+#+BEGIN_SRC: bash
|
|
1803
|
+emacs /etc/ircd-hybrid/ircd.conf
|
|
1804
|
+#+END_SRC
|
|
1805
|
+
|
|
1806
|
+Enter the md5 password which you previously created within the /operator/ section. Also change /user/ to:
|
|
1807
|
+
|
|
1808
|
+#+BEGIN_SRC: bash
|
|
1809
|
+ user = "*@*";
|
|
1810
|
+#+END_SRC
|
|
1811
|
+
|
|
1812
|
+Then save and exit.
|
|
1813
|
+
|
|
1814
|
+#+BEGIN_SRC: bash
|
|
1815
|
+emacs /usr/local/hybserv/hybserv.conf
|
|
1816
|
+#+END_SRC
|
|
1817
|
+
|
|
1818
|
+Change #MD5 PASSWORD HERE# to the md5 operator password created earlier:
|
|
1819
|
+
|
|
1820
|
+#+BEGIN_SRC: bash
|
|
1821
|
+O:*@*:#MD5 PASSWORD HERE#:root:segj (comment out other Q: lines)
|
|
1822
|
+A:mynickname <myemailaddress>
|
|
1823
|
+N:mydomainname.com:Hybrid services
|
|
1824
|
+S:ConnectPassword:192.168.1.60:6667 (remove the other two services)
|
|
1825
|
+#+END_SRC
|
|
1826
|
+
|
|
1827
|
+Save and exit.
|
|
1828
|
+
|
|
1829
|
+Create a daemon for hybserv2.
|
|
1830
|
+
|
|
1831
|
+#+BEGIN_SRC: bash
|
|
1832
|
+emacs /etc/init.d/hybserv2
|
|
1833
|
+#+END_SRC
|
|
1834
|
+
|
|
1835
|
+Enter the following, replacing /myusername/ with your username.
|
|
1836
|
+
|
|
1837
|
+#+BEGIN_SRC: bash
|
|
1838
|
+#! /bin/sh
|
|
1839
|
+### BEGIN INIT INFO
|
|
1840
|
+# Provides: hybserv
|
|
1841
|
+# Required-Start: $remote_fs $syslog
|
|
1842
|
+# Required-Stop: $remote_fs $syslog
|
|
1843
|
+# Default-Start: 2 3 4 5
|
|
1844
|
+# Default-Stop: 0 1 6
|
|
1845
|
+# Short-Description: Hybserv2 daemon
|
|
1846
|
+# Description: Hybserv2 daemon
|
|
1847
|
+### END INIT INFO
|
|
1848
|
+
|
|
1849
|
+# Do NOT "set -e"
|
|
1850
|
+
|
|
1851
|
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
|
1852
|
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/hybserv
|
|
1853
|
+DESC="Hybserv2 daemon"
|
|
1854
|
+NAME=hybserv
|
|
1855
|
+DAEMON=/usr/local/hybserv/$NAME
|
|
1856
|
+DAEMON_ARGS=""
|
|
1857
|
+PIDFILE=/var/run/ircd/$NAME.pid
|
|
1858
|
+SCRIPTNAME=/etc/init.d/$NAME
|
|
1859
|
+UID=myusername
|
|
1860
|
+GID=myusername
|
|
1861
|
+
|
|
1862
|
+# Exit if the package is not installed
|
|
1863
|
+[ -x "$DAEMON" ] || exit 0
|
|
1864
|
+
|
|
1865
|
+# Read configuration variable file if it is present
|
|
1866
|
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
|
1867
|
+
|
|
1868
|
+# Load the VERBOSE setting and other rcS variables
|
|
1869
|
+. /lib/init/vars.sh
|
|
1870
|
+
|
|
1871
|
+# Define LSB log_* functions.
|
|
1872
|
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
|
|
1873
|
+# and status_of_proc is working.
|
|
1874
|
+. /lib/lsb/init-functions
|
|
1875
|
+
|
|
1876
|
+#
|
|
1877
|
+# Function that starts the daemon/service
|
|
1878
|
+#
|
|
1879
|
+do_start()
|
|
1880
|
+{
|
|
1881
|
+ # Return
|
|
1882
|
+ # 0 if daemon has been started
|
|
1883
|
+ # 1 if daemon was already running
|
|
1884
|
+ # 2 if daemon could not be started
|
|
1885
|
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid $UID:$GID --test > /dev/null \
|
|
1886
|
+ || return 1
|
|
1887
|
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid $UID:$GID -- \
|
|
1888
|
+ $DAEMON_ARGS \
|
|
1889
|
+ || return 2
|
|
1890
|
+ # Add code here, if necessary, that waits for the process to be ready
|
|
1891
|
+ # to handle requests from services started subsequently which depend
|
|
1892
|
+ # on this one. As a last resort, sleep for some time.
|
|
1893
|
+}
|
|
1894
|
+
|
|
1895
|
+#
|
|
1896
|
+# Function that stops the daemon/service
|
|
1897
|
+#
|
|
1898
|
+do_stop()
|
|
1899
|
+{
|
|
1900
|
+ # Return
|
|
1901
|
+ # 0 if daemon has been stopped
|
|
1902
|
+ # 1 if daemon was already stopped
|
|
1903
|
+ # 2 if daemon could not be stopped
|
|
1904
|
+ # other if a failure occurred
|
|
1905
|
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
|
|
1906
|
+ RETVAL="$?"
|
|
1907
|
+ [ "$RETVAL" = 2 ] && return 2
|
|
1908
|
+ # Wait for children to finish too if this is a daemon that forks
|
|
1909
|
+ # and if the daemon is only ever run from this initscript.
|
|
1910
|
+ # If the above conditions are not satisfied then add some other code
|
|
1911
|
+ # that waits for the process to drop all resources that could be
|
|
1912
|
+ # needed by services started subsequently. A last resort is to
|
|
1913
|
+ # sleep for some time.
|
|
1914
|
+ start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
|
1915
|
+ [ "$?" = 2 ] && return 2
|
|
1916
|
+ # Many daemons don't delete their pidfiles when they exit.
|
|
1917
|
+ rm -f $PIDFILE
|
|
1918
|
+ return "$RETVAL"
|
|
1919
|
+}
|
|
1920
|
+
|
|
1921
|
+#
|
|
1922
|
+# Function that sends a SIGHUP to the daemon/service
|
|
1923
|
+#
|
|
1924
|
+do_reload() {
|
|
1925
|
+ #
|
|
1926
|
+ # If the daemon can reload its configuration without
|
|
1927
|
+ # restarting (for example, when it is sent a SIGHUP),
|
|
1928
|
+ # then implement that here.
|
|
1929
|
+ #
|
|
1930
|
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
|
|
1931
|
+ return 0
|
|
1932
|
+}
|
|
1933
|
+
|
|
1934
|
+case "$1" in
|
|
1935
|
+ start)
|
|
1936
|
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
|
1937
|
+ do_start
|
|
1938
|
+ case "$?" in
|
|
1939
|
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
1940
|
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
1941
|
+ esac
|
|
1942
|
+ ;;
|
|
1943
|
+ stop)
|
|
1944
|
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
|
1945
|
+ do_stop
|
|
1946
|
+ case "$?" in
|
|
1947
|
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
1948
|
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
|
1949
|
+ esac
|
|
1950
|
+ ;;
|
|
1951
|
+ status)
|
|
1952
|
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
|
1953
|
+ ;;
|
|
1954
|
+ #reload|force-reload)
|
|
1955
|
+ #
|
|
1956
|
+ # If do_reload() is not implemented then leave this commented out
|
|
1957
|
+ # and leave 'force-reload' as an alias for 'restart'.
|
|
1958
|
+ #
|
|
1959
|
+ #log_daemon_msg "Reloading $DESC" "$NAME"
|
|
1960
|
+ #do_reload
|
|
1961
|
+ #log_end_msg $?
|
|
1962
|
+ #;;
|
|
1963
|
+ restart|force-reload)
|
|
1964
|
+ #
|
|
1965
|
+ # If the "reload" option is implemented then remove the
|
|
1966
|
+ # 'force-reload' alias
|
|
1967
|
+ #
|
|
1968
|
+ log_daemon_msg "Restarting $DESC" "$NAME"
|
|
1969
|
+ do_stop
|
|
1970
|
+ case "$?" in
|
|
1971
|
+ 0|1)
|
|
1972
|
+ do_start
|
|
1973
|
+ case "$?" in
|
|
1974
|
+ 0) log_end_msg 0 ;;
|
|
1975
|
+ 1) log_end_msg 1 ;; # Old process is still running
|
|
1976
|
+ *) log_end_msg 1 ;; # Failed to start
|
|
1977
|
+ esac
|
|
1978
|
+ ;;
|
|
1979
|
+ *)
|
|
1980
|
+ # Failed to stop
|
|
1981
|
+ log_end_msg 1
|
|
1982
|
+ ;;
|
|
1983
|
+ esac
|
|
1984
|
+ ;;
|
|
1985
|
+ *)
|
|
1986
|
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
|
1987
|
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
|
1988
|
+ exit 3
|
|
1989
|
+ ;;
|
|
1990
|
+esac
|
|
1991
|
+
|
|
1992
|
+:
|
|
1993
|
+#+END_SRC
|
|
1994
|
+
|
|
1995
|
+Save and exit, then initialise the daemon, replacing /myusername/ with your username.
|
|
1996
|
+
|
|
1997
|
+#+BEGIN_SRC: bash
|
|
1998
|
+chown -R myusername:myusername /usr/local/hybserv
|
|
1999
|
+chmod u+x /etc/init.d/hybserv
|
|
2000
|
+update-rc.d hybserv defaults
|
|
2001
|
+#+END_SRC
|
|
2002
|
+
|
|
2003
|
+Now we need to restart the ircd and hybrid server to make things work:
|
|
2004
|
+
|
|
2005
|
+#+BEGIN_SRC: bash
|
1773
|
2006
|
service ircd-hybrid restart
|
|
2007
|
+service hybserv restart
|
|
2008
|
+#+END_SRC
|
|
2009
|
+
|
|
2010
|
+Try to connect to the IRC and identify yourself as an operator.
|
|
2011
|
+
|
|
2012
|
+In irssi:
|
|
2013
|
+
|
|
2014
|
+#+BEGIN_SRC: bash
|
|
2015
|
+/connect mydomainname.com
|
|
2016
|
+
|
|
2017
|
+/join #mychannel
|
|
2018
|
+
|
|
2019
|
+/msg -servername chanserv REGISTER #mychannel channelpassword
|
|
2020
|
+
|
|
2021
|
+/msg -servername chanserv set #mychannel mlock +k channelpassword
|
1774
|
2022
|
#+END_SRC
|
1775
|
2023
|
|
1776
|
2024
|
** Install Gopher
|
|
@@ -1967,7 +2215,7 @@ esac
|
1967
|
2215
|
Save and exit. Then start the gopher service.
|
1968
|
2216
|
|
1969
|
2217
|
#+BEGIN_SRC: bash
|
1970
|
|
-chmod +x /etc/init.d/gopher
|
|
2218
|
+chmod u+x /etc/init.d/gopher
|
1971
|
2219
|
update-rc.d gopher defaults
|
1972
|
2220
|
service gopher start
|
1973
|
2221
|
#+END_SRC
|