浏览代码

Installation of inadyn within images

Bob Mottram 6 年前
父节点
当前提交
f3e0653908
共有 2 个文件被更改,包括 14 次插入19 次删除
  1. 10
    12
      src/freedombone-image-customise
  2. 4
    7
      src/freedombone-utils-web

+ 10
- 12
src/freedombone-image-customise 查看文件

@@ -1657,6 +1657,7 @@ image_install_inadyn() {
1657 1657
         mkdir -p "$rootdir/root/build"
1658 1658
     fi
1659 1659
     chroot "$rootdir" apt-get -yq install build-essential curl libgnutls28-dev automake1.11 libconfuse-dev
1660
+    chroot "$rootdir" apt-get -yq install gnutls-dev libconfuse-dev
1660 1661
 
1661 1662
     if [ -d /repos/inadyn ]; then
1662 1663
         mkdir "$rootdir/root/build/inadyn"
@@ -1677,24 +1678,21 @@ image_install_inadyn() {
1677 1678
     cd "$rootdir/root/build/inadyn" || exit 24682464628
1678 1679
     { echo '#!/bin/bash';
1679 1680
       echo 'cd ~/build/inadyn';
1680
-      echo '#./autogen.sh';
1681
-      echo './configure';
1682
-      echo 'USE_OPENSSL=1 make';
1683
-      echo 'make install'; } > "$rootdir/root/build/build_inadyn.sh"
1681
+      echo './autogen.sh';
1682
+      echo './configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-openssl';
1683
+      echo 'make -j5';
1684
+      echo 'make install-strip'; } > "$rootdir/root/build/build_inadyn.sh"
1684 1685
     chmod +x "$rootdir/root/build/build_inadyn.sh"
1685 1686
     chroot "$rootdir" /root/build/build_inadyn.sh
1686
-    if [ ! -f "$rootdir/usr/local/sbin/inadyn" ]; then
1687
+    if [ ! -f "$rootdir/usr/sbin/inadyn" ]; then
1687 1688
         echo 'Failed to build inadyn'
1688 1689
         exit 6209356
1689 1690
     fi
1690 1691
 
1691 1692
     # create a configuration file
1692
-    { echo 'background';
1693
-      echo 'verbose        1';
1694
-      echo 'period         300';
1695
-      echo 'startup-delay  60';
1696
-      echo 'cache-dir      /run/inadyn';
1697
-      echo 'logfile        /dev/null'; } > "$rootdir/etc/inadyn.conf"
1693
+    { echo 'period          = 300';
1694
+      echo 'user-agent      = Mozilla/5.0';
1695
+      echo ''; } > "$rootdir/etc/inadyn.conf"
1698 1696
     chmod 600 "$rootdir/etc/inadyn.conf"
1699 1697
 
1700 1698
     { echo '[Unit]';
@@ -1702,7 +1700,7 @@ image_install_inadyn() {
1702 1700
       echo 'After=network.target';
1703 1701
       echo '';
1704 1702
       echo '[Service]';
1705
-      echo 'ExecStart=/usr/local/sbin/inadyn --config /etc/inadyn.conf';
1703
+      echo 'ExecStart=/usr/sbin/inadyn --config /etc/inadyn.conf';
1706 1704
       echo 'Restart=always';
1707 1705
       echo 'Type=forking';
1708 1706
       echo '';

+ 4
- 7
src/freedombone-utils-web 查看文件

@@ -535,12 +535,9 @@ function install_dynamicdns {
535 535
     fi
536 536
 
537 537
     # create a configuration file
538
-    { echo 'background';
539
-      echo 'verbose        1';
540
-      echo 'period         300';
541
-      echo 'startup-delay  60';
542
-      echo 'cache-dir      /run/inadyn';
543
-      echo 'logfile        /dev/null'; } > "${INADYN_CONFIG_FILE}"
538
+    { echo 'period          = 300';
539
+      echo 'user-agent      = Mozilla/5.0';
540
+      echo ''; } > "${INADYN_CONFIG_FILE}"
544 541
     chmod 600 "${INADYN_CONFIG_FILE}"
545 542
 
546 543
     { echo '[Unit]';
@@ -554,8 +551,8 @@ function install_dynamicdns {
554 551
       echo '';
555 552
       echo '[Install]';
556 553
       echo 'WantedBy=multi-user.target'; } > /etc/systemd/system/inadyn.service
557
-    systemctl enable inadyn
558 554
     systemctl daemon-reload
555
+    systemctl enable inadyn
559 556
     systemctl start inadyn
560 557
 
561 558
     # Remove old version of inadyn