Explorar el Código

crontab fixer

Serghey Rodin hace 12 años
padre
commit
8cdfe2b15c
Se han modificado 1 ficheros con 15 adiciones y 0 borrados
  1. 15 0
      upd/fix_cron.sh

+ 15 - 0
upd/fix_cron.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# Check if there is no crontab
+if [ ! -e "/var/spool/cron" ]; then
+    exit
+fi
+
+# Fix ownership and permissions
+for crn_tab in $(ls /var/spool/cron/); do
+    chown $crn_tab:$crn_tab /var/spool/cron/$crn_tab
+    chmod 600 /var/spool/cron/$crn_tab
+done
+
+exit
+