-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcreatelinks
executable file
·159 lines (134 loc) · 3.38 KB
/
createlinks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/usr/bin/perl -w
#
# Copyright (C) 2012 Nethesis S.r.l.
# http://www.nethesis.it - [email protected]
#
# This script is part of NethServer.
#
# NethServer is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or any later version.
#
# NethServer is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with NethServer. If not, see <http://www.gnu.org/licenses/>.
#
use esmith::Build::CreateLinks qw(:all);
use File::Path;
#
# nethserver-samba-update event (smb.conf template expanded above)
#
event_templates('nethserver-samba-update', qw(
/etc/samba/smb.conf
/etc/hosts
));
event_actions('nethserver-samba-update', qw(
initialize-default-databases 00
nethserver-samba-libwbclient 30
nethserver-samba-ns6sidfix 30
));
event_services('nethserver-samba-update', qw(
smb restart
nmb restart
winbind restart
));
#
# migration-import event (refs #1657)
#
event_actions('migration-import', qw(
nethserver-samba-migrate-conf 20
nethserver-samba-migrate-ibays 40
));
event_services('migration-import', qw(
smb restart
nmb restart
));
#
# ibay events
#
foreach (qw(ibay-create ibay-modify ibay-delete)) {
event_templates($_, qw(
/etc/samba/smb.conf
));
event_services($_, qw(
smb reload
));
}
#
# nethserver-samba-save event (#5404)
#
event_templates('nethserver-samba-save', qw(
/etc/samba/smb.conf
));
event_services('nethserver-samba-save', qw(
smb restart
nmb restart
));
#
# Shared folders events
#
# create
event_actions('ibay-create', qw(
nethserver-ibays-ibay-create 15
nethserver-ibays-set-permissions 20
));
# modify
event_actions('ibay-modify', qw(
nethserver-ibays-set-permissions 20
));
# delete
event_actions('ibay-delete',
'nethserver-ibays-ibay-delete' => '15'
);
# reset permissions
event_actions('ibay-reset-permissions', qw(
nethserver-ibays-set-permissions 20
nethserver-ibays-copy-permissions 30
));
# package install/update
event_actions('nethserver-ibays-update', qw(
initialize-default-databases 00
));
#--------------------------------------------------
# actions for ibay-name validator
#--------------------------------------------------
validator_actions('ibay-create', qw(
ibay-length 30
ibay-name 20
));
#
# migration-import event (refs #1688)
#
event_actions('migration-import', qw(
nethserver-ibays-migrate-begin 30
nethserver-ibays-migrate-commit 60
));
#
# post-restore-data event
#
event_actions('post-restore-data', qw(
nethserver-ibays-remap-locals 55
nethserver-ibays-restore 60
nethserver-samba-ns6upgrade-ibays 60
));
#
# nethserver-directory-ns6upgrade event
#
event_actions('nethserver-directory-ns6upgrade', qw(
nethserver-ibays-remap-locals 60
nethserver-samba-ns6sidfix 60
));
event_services('nethserver-directory-ns6upgrade', qw(
winbind restart
));
#
# pre-backup-data event
#
event_actions('pre-backup-data', qw(
nethserver-ibays-dump-acls 50
));