Added installation on the server.

Pascal J. Bourguignon [2015-08-07 03:47]
Added installation on the server.
Filename
ddns/Makefile
ddns/README
diff --git a/ddns/Makefile b/ddns/Makefile
index 9e03672..26f4cc7 100644
--- a/ddns/Makefile
+++ b/ddns/Makefile
@@ -32,6 +32,8 @@
 ####    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ####*****************************************************************************

+INSTALLDIR=/home/ddns/bin/
+

 CCL            = ccl
 CCL_EVAL       =  --eval
@@ -50,10 +52,12 @@ EVAL           = $(CLISP_EVAL)

 all: compile

+
 compile:server client
 install:compile
-	install -m 755 ddns-server /usr/local/sbin/
-	install -m 755 ddns-client /usr/local/sbin/
+	-mkdir -p $(INSTALLDIR)
+	[ -d $(INSTALLDIR) ] && install -m 755 ddns-server $(INSTALLDIR)
+	[ -d $(INSTALLDIR) ] && install -m 755 ddns-client $(INSTALLDIR)


 # server:
diff --git a/ddns/README b/ddns/README
index 5a05e77..ca5bb72 100644
--- a/ddns/README
+++ b/ddns/README
@@ -1,22 +1,5 @@
 .. comment: -*- mode:rst;coding:utf-8 -*-

-Current configuration
-================================================================================
-
-On kuiper, /usr/local/sbin/ddns-client is run from root
-/etc/fcron/fcrontab.
-
-- /root/dnskeys/
-
-::
-   5  *    * * *   root    /usr/local/sbin/ddns-client -- kuiper
-
-
-On hubble, /home/ddns/bin/ddns-server is run from ddns in a screen
-launched from /etc/rc.local
-
-- /home/ddns/dnskeys/
-
 Compilation
 ================================================================================

@@ -39,3 +22,58 @@ Compilation
 - then you may compile the programs, and install them in /usr/local/sbin/: ::

     make && make install
+
+Installation
+================================================================================
+
+On the server
+--------------------------------------------------------------------------------
+
+#. Create a ddns user account: ::
+
+     groupadd --system ddns
+     useradd --system -d /home/ddns/ -m -c 'DDNS Server' -s /bin/bash -g ddns ddns
+     mkdir /home/ddns/dnskeys /home/ddns/etc
+     # install:
+     #    ddns.secret
+     #    Kdyn.informatimago.com.+157+24639.key
+     #    Kdyn.informatimago.com.+157+24639.private
+     # in /home/ddns/dnskeys
+
+#. The server is installed in ``/home/ddns/bin/`` with: ::
+
+     make install
+
+#. Edit ``/etc/rc.local``, adding: ::
+
+    su -c 'screen -d -m -S ddns -t server -c /home/ddns/etc/screenrc \
+	     bash -c  "export LC_CTYPE=en_US.UTF-8 ; while sleep 2 ; do \
+		       /home/ddns/bin/ddns-server ; done"' \
+	- ddns
+
+#. Launch it immediately with: ::
+
+     /etc/init.d/rc.local restart
+
+
+On the clients
+--------------------------------------------------------------------------------
+
+
+Current configuration
+================================================================================
+
+On kuiper, /usr/local/sbin/ddns-client is run from root
+/etc/fcron/fcrontab.
+
+- /root/dnskeys/
+
+::
+   5  *    * * *   root    /usr/local/sbin/ddns-client -- kuiper
+
+
+On hubble, /home/ddns/bin/ddns-server is run from ddns in a screen
+launched from /etc/rc.local
+
+- /home/ddns/dnskeys/
+
ViewGit