adding crontab editor

This commit is contained in:
mcguirepr89
2022-01-24 18:38:45 -05:00
parent c3fb5c2a36
commit cebcff5768
4 changed files with 54 additions and 14 deletions
+4 -7
View File
@@ -500,13 +500,10 @@ install_nomachine() {
install_cleanup_cron() {
echo "Installing the cleanup.cron"
if ! crontab -u ${USER} -l &> /dev/null;then
crontab -u ${USER} $(dirname ${my_dir})/templates/cleanup.cron &> /dev/null
else
crontab -u ${USER} -l > ${tmpfile}
cat $(dirname ${my_dir})/templates/cleanup.cron >> ${tmpfile}
crontab -u ${USER} "${tmpfile}" &> /dev/null
fi
echo $(dirname ${my_dir})/templates/cleanup.cron >> /etc/crontab
chown root:pi /etc/crontab
chmod g+rw /etc/crontab
}
install_selected_services() {