1 |
diff -urN smeserver-crontab_manager-2.4.old/createlinks smeserver-crontab_manager-2.4/createlinks |
2 |
--- smeserver-crontab_manager-2.4.old/createlinks 2005-08-27 13:30:43.000000000 +0100 |
3 |
+++ smeserver-crontab_manager-2.4/createlinks 2020-10-12 15:19:18.774943342 +0100 |
4 |
@@ -14,6 +14,15 @@ |
5 |
"/cgi-bin/$function: $!"; |
6 |
} |
7 |
|
8 |
+sub safe_symlink { |
9 |
+ my ($from, $to) = @_; |
10 |
+ use File::Basename; |
11 |
+ use File::Path; |
12 |
+ mkpath(dirname($to)); |
13 |
+ unlink($to); |
14 |
+ symlink($from, $to) or die "Can't create symlink from $from to $to: $!"; |
15 |
+} |
16 |
+ |
17 |
sub event_link |
18 |
{ |
19 |
my ($action, $event, $level) = @_; |
20 |
@@ -49,3 +58,4 @@ |
21 |
#event_link("action1", $event, "55"); |
22 |
#event_link("action2", $event, "90"); |
23 |
|
24 |
+safe_symlink("/etc/e-smith/web/functions/wrapper","root/etc/e-smith/web/panels/manager/cgi-bin/cronmanager"); |