Update installer

This commit is contained in:
q3aql 2024-10-27 10:51:43 +01:00
parent 89dfe48604
commit 39cbef4f1c

View File

@ -69,27 +69,56 @@ if [ ${error_cloning} -ne 0 ] ; then
fi fi
# Install script and cron # Install script and cron
if [ -f "$(dirname $0)/lf-updr.sh" ] ; then if [ -f "$(dirname $0)/lf-updr" ] ; then
echo "* Installing /usr/bin/lf-updr" echo "* Installing /usr/bin/lf-updr"
cp -rf $(dirname $0)/lf-updr.sh /usr/bin/lf-updr cp -rf $(dirname $0)/lf-updr /usr/bin/lf-updr
chmod +x /usr/bin/lf-updr chmod +x /usr/bin/lf-updr
else else
echo "* Error installing /usr/bin/lf-updr" echo "* Error installing /usr/bin/lf-updr"
echo "* File $(dirname $0)/lf-updr.sh not found"
exit 1
fi
if [ -f "$(dirname $0)/lf-updr" ] ; then
echo "* Installing /etc/cron.d/lf-updr"
cp -rf $(dirname $0)/lf-updr /etc/cron.d/lf-updr
chmod 644 /etc/cron.d/lf-updr
else
echo "* Error installing /etc/crond./lf-updr"
echo "* File $(dirname $0)/lf-updr not found" echo "* File $(dirname $0)/lf-updr not found"
exit 1 exit 1
fi fi
if [ -f "$(dirname $0)/lf-updrd" ] ; then
echo "* Installing /usr/sbin/lf-updrd"
cp -rf $(dirname $0)/lf-updrd /usr/sbin/lf-updrd
chmod +x /usr/sbin/lf-updrd
else
echo "* Error installing /usr/sbin/lf-updrd"
echo "* File $(dirname $0)/lf-updrd not found"
exit 1
fi
if [ -f "$(dirname $0)/lf-updr-install" ] ; then
echo "* Installing /usr/bin/lf-updr-install"
cp -rf $(dirname $0)/lf-updr-install /usr/bin/lf-updr-install
chmod +x /usr/bin/lf-updr-install
else
echo "* Error installing /usr/bin/lf-updr-install"
echo "* File $(dirname $0)/lf-updr-install not found"
exit 1
fi
if [ -f "$(dirname $0)/lf-updr.cron" ] ; then
echo "* Installing /etc/cron.d/lf-updr"
cp -rf $(dirname $0)/lf-updr.cron /etc/cron.d/lf-updr
chmod 644 /etc/cron.d/lf-updr
else
echo "* Error installing /etc/crond./lf-updr"
echo "* File $(dirname $0)/lf-updr.cron not found"
exit 1
fi
if [ -f "$(dirname $0)/lf-updrd.service" ] ; then
echo "* Installing /etc/systemd/system/lf-updrd.service"
cp -rf $(dirname $0)/lf-updrd.service /etc/systemd/system/lf-updrd.service
chmod 644 /etc/systemd/system/lf-updrd.service
else
echo "* Error installing /etc/systemd/system/lf-updrd.service"
echo "* File $(dirname $0)/lf-updrd.service not found"
exit 1
fi
systemctl enable lf-updrd
# Run update-initramfs # Run update-initramfs
echo "* Running update-initramfs" echo "* Running update-initramfs"
if [ -x /usr/sbin/update-initramfs ]; then if [ -x /usr/sbin/update-initramfs ]; then
/usr/sbin/update-initramfs -u -k all /usr/sbin/update-initramfs -u -k all
fi fi
systemctl start lf-updrd