diff --git a/scripts/advanced.php b/scripts/advanced.php index f9aae7e..dd7ffef 100644 --- a/scripts/advanced.php +++ b/scripts/advanced.php @@ -140,6 +140,7 @@ if(isset($_SESSION['success'])){

+ diff --git a/scripts/edit_crontab.php b/scripts/edit_crontab.php new file mode 100644 index 0000000..72b1616 --- /dev/null +++ b/scripts/edit_crontab.php @@ -0,0 +1,46 @@ +Moved.', htmlspecialchars($url)); + exit(); +} + +// read the textfile +$text = file_get_contents($file); + +?> + + + + +
+ + +
+ +
+ diff --git a/scripts/install_services.sh b/scripts/install_services.sh index f1f311b..b76ec87 100755 --- a/scripts/install_services.sh +++ b/scripts/install_services.sh @@ -505,13 +505,9 @@ 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() { diff --git a/scripts/update_services.sh b/scripts/update_services.sh index 75dbcb0..0b86ab2 100755 --- a/scripts/update_services.sh +++ b/scripts/update_services.sh @@ -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() {