Skip to content

Commit 45bf045

Browse files
committed
OA-46 Use symbolic links instead of hard links
1 parent aad7a3a commit 45bf045

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

build/package/postinst.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@ if [ -f /usr/bin/openitcockpit-agent ]; then
1414
if [ -d /lib/systemd/system/ ]; then
1515
# Debian / Ubuntu / Arch
1616
if [ ! -f /lib/systemd/system/openitcockpit-agent.service ]; then
17-
ln /etc/openitcockpit-agent/init/openitcockpit-agent.service /lib/systemd/system/openitcockpit-agent.service
17+
ln -s /etc/openitcockpit-agent/init/openitcockpit-agent.service /lib/systemd/system/openitcockpit-agent.service
1818
fi
1919
elif [ -d /usr/lib/systemd/system/ ]; then
2020
# RedHat / Suse
2121
if [ ! -f /usr/lib/systemd/system/openitcockpit-agent.service ]; then
22-
ln /etc/openitcockpit-agent/init/openitcockpit-agent.service /usr/lib/systemd/system/openitcockpit-agent.service
22+
ln -s /etc/openitcockpit-agent/init/openitcockpit-agent.service /usr/lib/systemd/system/openitcockpit-agent.service
2323
fi
2424
fi
25-
25+
2626
systemctl daemon-reload
2727
systemctl start openitcockpit-agent
2828
systemctl enable openitcockpit-agent
2929
else
30-
30+
3131
enableConfig="0"
3232
if [ ! -f /etc/init.d/openitcockpit-agent ]; then
3333
enableConfig="1"
34-
ln /etc/openitcockpit-agent/init/openitcockpit-agent.init /etc/init.d/openitcockpit-agent
34+
ln -s /etc/openitcockpit-agent/init/openitcockpit-agent.init /etc/init.d/openitcockpit-agent
3535
fi
36-
36+
3737
if [ "$enableConfig" == "1" ]; then
3838
if [ -x "$(command -v update-rc.d)" ]; then
3939
# Debian / Ubuntu
@@ -44,7 +44,7 @@ if [ -f /usr/bin/openitcockpit-agent ]; then
4444
chkconfig openitcockpit-agent on
4545
fi
4646
fi
47-
47+
4848
service openitcockpit-agent start
4949
fi
5050

@@ -78,7 +78,7 @@ if [ -f /Applications/openitcockpit-agent/openitcockpit-agent ]; then
7878
if [ "$enableConfig" == "1" ]; then
7979
/bin/launchctl load /Library/LaunchDaemons/com.it-novum.openitcockpit.agent.plist
8080
fi
81-
81+
8282
if [ ! -d "/Library/Logs/openitcockpit-agent" ]; then
8383
mkdir -p /Library/Logs/openitcockpit-agent
8484
fi

0 commit comments

Comments
 (0)