File tree Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Expand file tree Collapse file tree 1 file changed +4
-24
lines changed Original file line number Diff line number Diff line change 14
14
shift
15
15
done
16
16
17
- if [ -r /etc/syslog.conf ]; then
18
- conf_file=/etc/syslog.conf
19
- service=syslog
20
- fi
21
-
22
- if [ -r /etc/rsyslog.conf ]; then
23
- conf_file=/etc/rsyslog.conf
24
- service=rsyslog
25
- fi
26
-
27
- if [ -r /etc/rsyslog.d/xenserver.conf ]; then
28
- conf_file=/etc/rsyslog.d/xenserver.conf
29
- service=rsyslog
30
- fi
31
-
32
- if [ -z " $service " ]; then
33
- echo " Error: unable to determine syslog service" >&2
34
- exit 1
35
- fi
36
17
37
- sed -e ' /^\*\.\*.*[@~]/ d' $conf_file > /etc/syslog.$$
38
18
if [ $remote -eq 1 ]; then
39
- echo -e " *.* @$host \n*.* ~" >> /etc/syslog.$$
19
+ echo " # /etc/rsyslog.d/remote.conf is auto-generated by xe-syslog-reconfigure" > /etc/rsyslog.d/remote.conf
20
+ echo " *.* @$host " >> /etc/rsyslog.d/remote.conf
40
21
else
41
- echo " *.* ~ " >> /etc/syslog. $$
22
+ rm -f /etc/rsyslog.d/remote.conf
42
23
fi
43
24
44
- [ -s /etc/syslog.$$ ] && mv -f /etc/syslog.$$ $conf_file
45
- systemctl restart $service
25
+ systemctl restart rsyslog
You can’t perform that action at this time.
0 commit comments