Update installer
This commit is contained in:
parent
89dfe48604
commit
39cbef4f1c
51
install.sh
51
install.sh
|
@ -69,27 +69,56 @@ if [ ${error_cloning} -ne 0 ] ; then
|
|||
fi
|
||||
|
||||
# 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"
|
||||
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
|
||||
else
|
||||
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"
|
||||
exit 1
|
||||
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
|
||||
echo "* Running update-initramfs"
|
||||
if [ -x /usr/sbin/update-initramfs ]; then
|
||||
/usr/sbin/update-initramfs -u -k all
|
||||
fi
|
||||
systemctl start lf-updrd
|
||||
|
|
Loading…
Reference in New Issue
Block a user