Explorar el Código

Inadyn systemd daemon

Bob Mottram hace 7 años
padre
commit
5a24012929
Se han modificado 2 ficheros con 20 adiciones y 12 borrados
  1. 10
    6
      src/freedombone-image-customise
  2. 10
    6
      src/freedombone-utils-web

+ 10
- 6
src/freedombone-image-customise Ver fichero

1657
         mkdir -p "$rootdir/root/build"
1657
         mkdir -p "$rootdir/root/build"
1658
     fi
1658
     fi
1659
     chroot "$rootdir" apt-get -yq install build-essential curl libgnutls28-dev automake1.11 libconfuse-dev
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
+    chroot "$rootdir" apt-get -yq install gnutls-dev libconfuse-dev pkg-config
1661
 
1661
 
1662
     if [ -d /repos/inadyn ]; then
1662
     if [ -d /repos/inadyn ]; then
1663
         mkdir "$rootdir/root/build/inadyn"
1663
         mkdir "$rootdir/root/build/inadyn"
1696
     chmod 600 "$rootdir/etc/inadyn.conf"
1696
     chmod 600 "$rootdir/etc/inadyn.conf"
1697
 
1697
 
1698
     { echo '[Unit]';
1698
     { echo '[Unit]';
1699
-      echo 'Description=inadyn (DynDNS updater)';
1700
-      echo 'After=network.target';
1699
+      echo 'Description=Internet Dynamic DNS Client';
1700
+      echo 'Documentation=man:inadyn';
1701
+      echo 'Documentation=man:inadyn.conf';
1702
+      echo 'Documentation=https://github.com/troglobit/inadyn';
1703
+      echo 'ConditionPathExists=/etc/inadyn.conf';
1704
+      echo 'After=network-online.target';
1705
+      echo 'Requires=network-online.target';
1701
       echo '';
1706
       echo '';
1702
       echo '[Service]';
1707
       echo '[Service]';
1703
-      echo 'ExecStart=/usr/sbin/inadyn --config /etc/inadyn.conf';
1704
-      echo 'Restart=always';
1705
-      echo 'Type=forking';
1708
+      echo 'Type=simple';
1709
+      echo "ExecStart=/usr/sbin/inadyn -n -s --config ${INADYN_CONFIG_FILE}";
1706
       echo '';
1710
       echo '';
1707
       echo '[Install]';
1711
       echo '[Install]';
1708
       echo 'WantedBy=multi-user.target'; } > "$rootdir/etc/systemd/system/inadyn.service"
1712
       echo 'WantedBy=multi-user.target'; } > "$rootdir/etc/systemd/system/inadyn.service"

+ 10
- 6
src/freedombone-utils-web Ver fichero

526
     # https version 1.99.8
526
     # https version 1.99.8
527
 
527
 
528
     apt-get -yq install build-essential curl libgnutls28-dev automake1.11
528
     apt-get -yq install build-essential curl libgnutls28-dev automake1.11
529
-    apt-get -yq install gnutls-dev libconfuse-dev
529
+    apt-get -yq install gnutls-dev libconfuse-dev pkg-config
530
 
530
 
531
     if [ ! -d "$INSTALL_DIR/inadyn" ]; then
531
     if [ ! -d "$INSTALL_DIR/inadyn" ]; then
532
         if [ -d /repos/inadyn ]; then
532
         if [ -d /repos/inadyn ]; then
568
     chmod 600 "${INADYN_CONFIG_FILE}"
568
     chmod 600 "${INADYN_CONFIG_FILE}"
569
 
569
 
570
     { echo '[Unit]';
570
     { echo '[Unit]';
571
-      echo 'Description=inadyn (DynDNS updater)';
572
-      echo 'After=network.target';
571
+      echo 'Description=Internet Dynamic DNS Client';
572
+      echo 'Documentation=man:inadyn';
573
+      echo 'Documentation=man:inadyn.conf';
574
+      echo 'Documentation=https://github.com/troglobit/inadyn';
575
+      echo 'ConditionPathExists=/etc/inadyn.conf';
576
+      echo 'After=network-online.target';
577
+      echo 'Requires=network-online.target';
573
       echo '';
578
       echo '';
574
       echo '[Service]';
579
       echo '[Service]';
575
-      echo "ExecStart=/usr/sbin/inadyn --config ${INADYN_CONFIG_FILE}";
576
-      echo 'Restart=always';
577
-      echo 'Type=forking';
580
+      echo 'Type=simple';
581
+      echo "ExecStart=/usr/sbin/inadyn -n -s --config ${INADYN_CONFIG_FILE}";
578
       echo '';
582
       echo '';
579
       echo '[Install]';
583
       echo '[Install]';
580
       echo 'WantedBy=multi-user.target'; } > /etc/systemd/system/inadyn.service
584
       echo 'WantedBy=multi-user.target'; } > /etc/systemd/system/inadyn.service