Installation of inadyn within images
This commit is contained in:
parent
295601f375
commit
f3e0653908
|
@ -1657,6 +1657,7 @@ image_install_inadyn() {
|
|||
mkdir -p "$rootdir/root/build"
|
||||
fi
|
||||
chroot "$rootdir" apt-get -yq install build-essential curl libgnutls28-dev automake1.11 libconfuse-dev
|
||||
chroot "$rootdir" apt-get -yq install gnutls-dev libconfuse-dev
|
||||
|
||||
if [ -d /repos/inadyn ]; then
|
||||
mkdir "$rootdir/root/build/inadyn"
|
||||
|
@ -1677,24 +1678,21 @@ image_install_inadyn() {
|
|||
cd "$rootdir/root/build/inadyn" || exit 24682464628
|
||||
{ echo '#!/bin/bash';
|
||||
echo 'cd ~/build/inadyn';
|
||||
echo '#./autogen.sh';
|
||||
echo './configure';
|
||||
echo 'USE_OPENSSL=1 make';
|
||||
echo 'make install'; } > "$rootdir/root/build/build_inadyn.sh"
|
||||
echo './autogen.sh';
|
||||
echo './configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-openssl';
|
||||
echo 'make -j5';
|
||||
echo 'make install-strip'; } > "$rootdir/root/build/build_inadyn.sh"
|
||||
chmod +x "$rootdir/root/build/build_inadyn.sh"
|
||||
chroot "$rootdir" /root/build/build_inadyn.sh
|
||||
if [ ! -f "$rootdir/usr/local/sbin/inadyn" ]; then
|
||||
if [ ! -f "$rootdir/usr/sbin/inadyn" ]; then
|
||||
echo 'Failed to build inadyn'
|
||||
exit 6209356
|
||||
fi
|
||||
|
||||
# create a configuration file
|
||||
{ echo 'background';
|
||||
echo 'verbose 1';
|
||||
echo 'period 300';
|
||||
echo 'startup-delay 60';
|
||||
echo 'cache-dir /run/inadyn';
|
||||
echo 'logfile /dev/null'; } > "$rootdir/etc/inadyn.conf"
|
||||
{ echo 'period = 300';
|
||||
echo 'user-agent = Mozilla/5.0';
|
||||
echo ''; } > "$rootdir/etc/inadyn.conf"
|
||||
chmod 600 "$rootdir/etc/inadyn.conf"
|
||||
|
||||
{ echo '[Unit]';
|
||||
|
@ -1702,7 +1700,7 @@ image_install_inadyn() {
|
|||
echo 'After=network.target';
|
||||
echo '';
|
||||
echo '[Service]';
|
||||
echo 'ExecStart=/usr/local/sbin/inadyn --config /etc/inadyn.conf';
|
||||
echo 'ExecStart=/usr/sbin/inadyn --config /etc/inadyn.conf';
|
||||
echo 'Restart=always';
|
||||
echo 'Type=forking';
|
||||
echo '';
|
||||
|
|
|
@ -535,12 +535,9 @@ function install_dynamicdns {
|
|||
fi
|
||||
|
||||
# create a configuration file
|
||||
{ echo 'background';
|
||||
echo 'verbose 1';
|
||||
echo 'period 300';
|
||||
echo 'startup-delay 60';
|
||||
echo 'cache-dir /run/inadyn';
|
||||
echo 'logfile /dev/null'; } > "${INADYN_CONFIG_FILE}"
|
||||
{ echo 'period = 300';
|
||||
echo 'user-agent = Mozilla/5.0';
|
||||
echo ''; } > "${INADYN_CONFIG_FILE}"
|
||||
chmod 600 "${INADYN_CONFIG_FILE}"
|
||||
|
||||
{ echo '[Unit]';
|
||||
|
@ -554,8 +551,8 @@ function install_dynamicdns {
|
|||
echo '';
|
||||
echo '[Install]';
|
||||
echo 'WantedBy=multi-user.target'; } > /etc/systemd/system/inadyn.service
|
||||
systemctl enable inadyn
|
||||
systemctl daemon-reload
|
||||
systemctl enable inadyn
|
||||
systemctl start inadyn
|
||||
|
||||
# Remove old version of inadyn
|
||||
|
|
Loading…
Reference in New Issue