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