File tree Expand file tree Collapse file tree 4 files changed +30
-10
lines changed Expand file tree Collapse file tree 4 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 1
- 3.0.3
1
+ 3.0.5
Original file line number Diff line number Diff line change @@ -11,12 +11,14 @@ set -u
11
11
if [ -f /usr/bin/openitcockpit-agent ]; then
12
12
13
13
if [ -x " $( command -v systemctl) " ]; then
14
- if [ ! -f /lib/systemd/system/openitcockpit-agent.service ]; then
15
- if [ -d /lib/systemd/system/ ] ; then
16
- # Debian / Ubuntu / Arch
14
+ if [ -d /lib/systemd/system/ ]; then
15
+ # Debian / Ubuntu / Arch
16
+ if [ ! -f /lib/systemd/system/openitcockpit-agent.service ] ; then
17
17
ln /etc/openitcockpit-agent/init/openitcockpit-agent.service /lib/systemd/system/openitcockpit-agent.service
18
- elif [ -d /usr/lib/systemd/system/ ]; then
19
- # RedHat / Suse
18
+ fi
19
+ elif [ -d /usr/lib/systemd/system/ ]; then
20
+ # RedHat / Suse
21
+ if [ ! -f /usr/lib/systemd/system/openitcockpit-agent.service ]; then
20
22
ln /etc/openitcockpit-agent/init/openitcockpit-agent.service /usr/lib/systemd/system/openitcockpit-agent.service
21
23
fi
22
24
fi
Original file line number Diff line number Diff line change @@ -15,8 +15,13 @@ if [ -f /usr/bin/openitcockpit-agent ]; then
15
15
/bin/systemctl -a | grep openitcockpit-agent > /dev/null
16
16
RC=$?
17
17
if [ " $RC " -eq 0 ]; then
18
- /bin/systemctl stop openitcockpit-agent
19
- /bin/systemctl disable openitcockpit-agent
18
+
19
+ if [ " $1 " -eq " 0" ] || [ " $1 " = " purge" ] || [ " $1 " = " remove" ] ; then
20
+ # Uninstall on CentOS / Debian / Ubuntu
21
+ /bin/systemctl stop openitcockpit-agent
22
+ /bin/systemctl disable openitcockpit-agent
23
+ fi
24
+
20
25
fi
21
26
else
22
27
service openitcockpit-agent stop
@@ -31,7 +36,20 @@ if [ -f /usr/bin/openitcockpit-agent ]; then
31
36
fi
32
37
33
38
fi
34
- rm -f /etc/init.d/openitcockpit-agent /lib/systemd/system/openitcockpit-agent.service /usr/lib/systemd/system/openitcockpit-agent.service /var/log/openitcockpit-agent
39
+
40
+ if [ " $1 " -eq " 0" ]; then
41
+ # Uninstall on CentOS
42
+ # https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
43
+ # https://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets
44
+ rm -f /etc/init.d/openitcockpit-agent /lib/systemd/system/openitcockpit-agent.service /usr/lib/systemd/system/openitcockpit-agent.service /var/log/openitcockpit-agent
45
+ fi
46
+
47
+ if [ " $1 " = " purge" ] || [ " $1 " = " remove" ] ; then
48
+ # Uninstall on Debian / Ubuntu
49
+ # https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
50
+ rm -f /etc/init.d/openitcockpit-agent /lib/systemd/system/openitcockpit-agent.service /usr/lib/systemd/system/openitcockpit-agent.service /var/log/openitcockpit-agent
51
+ fi
52
+
35
53
set -e
36
54
37
55
fi
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import (
14
14
)
15
15
16
16
// AgentVersion as the name says
17
- const AgentVersion = "3.0.3 "
17
+ const AgentVersion = "3.0.5 "
18
18
19
19
// CustomCheck are external plugins and scripts which should be executed by the Agent
20
20
type CustomCheck struct {
You can’t perform that action at this time.
0 commit comments