1 |
--- smeserver-freepbx-0.1/createlinks.clean_crontab 2009-04-11 00:23:58.000000000 +0200 |
2 |
+++ smeserver-freepbx-0.1/createlinks 2009-04-11 00:59:49.000000000 +0200 |
3 |
@@ -40,6 +40,7 @@ |
4 |
event_link("freepbx-checkinstall", $event, "10"); |
5 |
event_link("freepbx-applypatch", $event, "20"); |
6 |
event_link("freepbx-security", $event, "30"); |
7 |
+event_link("freepbx-clean-crontab", $event, "40"); |
8 |
event_link("freepbx-security", "bootstrap-console-save", "90"); |
9 |
event_link("freepbx-dump-astdb", "pre-backup", "30"); |
10 |
|
11 |
--- smeserver-freepbx-0.1/root/etc/e-smith/events/actions/freepbx-clean-crontab.clean_crontab 2009-04-11 00:58:22.000000000 +0200 |
12 |
+++ smeserver-freepbx-0.1/root/etc/e-smith/events/actions/freepbx-clean-crontab 2009-04-11 01:03:44.000000000 +0200 |
13 |
@@ -0,0 +1,19 @@ |
14 |
+#/bin/bash |
15 |
+ |
16 |
+# Remove crontab entry automatically added by FreePBX |
17 |
+# as it generate an error (run as root before asterisk |
18 |
+# which means asterisk won't be allowed to open the debug |
19 |
+# file /tmp/freepbx_debug.log, and send a email to the admin |
20 |
+ |
21 |
+crontab -l > /tmp/freepbx_crontab |
22 |
+awk '$0!~/freepbx-cron-scheduler.php/ { print $0 }' /tmp/freepbx_crontab |
23 |
+crontab /tmp/freepbx_crontab |
24 |
+rm /tmp/freepbx_crontab |
25 |
+ |
26 |
+# Now change permissions on /tmp/freepbx_debug.log to be sure |
27 |
+# asterisk user has write permission |
28 |
+if [ -e /tmp/freepbx_debug.log ]; then |
29 |
+ chown asterisk:asterisk /tmp/freepbx_debug.log |
30 |
+ chmod 700 /tmp/freepbx_debug.log |
31 |
+fi |
32 |
+ |