Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(distrib): Fixed Kura SystemD Unit dependencies #5623

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion kura/distrib/src/main/ant/build_equinox_distrib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,19 @@ fi]]>
<copy file="src/main/resources/common/kura.service"
tofile="${project.build.directory}/${build.output.name}/kura.service"
failonerror="false" />
<copy file="src/main/resources/common/kura.service.nn"
tofile="${project.build.directory}/${build.output.name}/kura.service.nn"
failonerror="false" />
<replaceregexp
file="${project.build.directory}/${build.output.name}/kura_install.sh"
match="INSTALL_DIR=.*" replace="INSTALL_DIR=${kura.install.dir}" />
<replaceregexp
file="${project.build.directory}/${build.output.name}/kura.service"
match="INSTALL_DIR" replace="${kura.install.dir}" />

<replaceregexp
file="${project.build.directory}/${build.output.name}/kura.service.nn"
match="INSTALL_DIR" replace="${kura.install.dir}" />

<zip destfile="${project.build.directory}/${build.output.name}.zip">

<zipfileset
Expand Down Expand Up @@ -449,6 +455,9 @@ fi]]>
<zipfileset
file="${project.build.directory}/${build.output.name}/kura.service"
prefix="${build.output.name}/${install.folder}" />
<zipfileset
file="${project.build.directory}/${build.output.name}/kura.service.nn"
prefix="${build.output.name}/${install.folder}" />
<zipfileset file="src/main/resources/${build.name}/firewall.service"
prefix="${build.output.name}/${install.folder}" filemode="700" />
<zipfileset file="src/main/resources/${build.name}/firewall.init"
Expand Down
2 changes: 1 addition & 1 deletion kura/distrib/src/main/resources/aarch64-nn/kura_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ INSTALL_DIR=/opt/eclipse
ln -sf ${INSTALL_DIR}/kura_* ${INSTALL_DIR}/kura

# set up kura init
sed "s|INSTALL_DIR|${INSTALL_DIR}|" ${INSTALL_DIR}/kura/install/kura.service > /lib/systemd/system/kura.service
sed "s|INSTALL_DIR|${INSTALL_DIR}|" ${INSTALL_DIR}/kura/install/kura.service.nn > /lib/systemd/system/kura.service
systemctl daemon-reload
systemctl enable kura
chmod +x ${INSTALL_DIR}/kura/bin/*.sh
Expand Down
4 changes: 2 additions & 2 deletions kura/distrib/src/main/resources/common/kura.service
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=Kura
Wants=networking.service dbus.service
After=networking.service dbus.service
Wants=NetworkManager.service ModemManager.service dbus.service
After=NetworkManager.service ModemManager.service dbus.service

[Service]
User=kurad
Expand Down
20 changes: 20 additions & 0 deletions kura/distrib/src/main/resources/common/kura.service.nn
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[Unit]
Description=Kura
Wants=dbus.service
After=dbus.service

[Service]
User=kurad
Group=kurad
Type=forking
ExecStart=/bin/sh INSTALL_DIR/kura/bin/start_kura_background.sh
ExecStopPost=/bin/sh -c 'if [ -f /tmp/watchdog ]; then echo w > `cat /tmp/watchdog`; fi'
PIDFile=/var/run/kura.pid
Restart=on-failure
RestartSec=5
SuccessExitStatus=143
KillMode=process
AmbientCapabilities=cap_net_admin cap_net_raw cap_dac_override cap_dac_read_search cap_net_bind_service cap_sys_boot cap_kill cap_sys_module cap_sys_time cap_sys_tty_config cap_syslog

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ INSTALL_DIR=/opt/eclipse
ln -sf ${INSTALL_DIR}/kura_* ${INSTALL_DIR}/kura

#set up Kura init
sed "s|INSTALL_DIR|${INSTALL_DIR}|" ${INSTALL_DIR}/kura/install/kura.service > /lib/systemd/system/kura.service
sed "s|INSTALL_DIR|${INSTALL_DIR}|" ${INSTALL_DIR}/kura/install/kura.service.nn > /lib/systemd/system/kura.service
systemctl daemon-reload
systemctl enable kura
chmod +x ${INSTALL_DIR}/kura/bin/*.sh
Expand Down
2 changes: 1 addition & 1 deletion kura/distrib/src/main/resources/x86_64-nn/kura_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ INSTALL_DIR=/opt/eclipse
ln -sf ${INSTALL_DIR}/kura_* ${INSTALL_DIR}/kura

# set up kura init
sed "s|INSTALL_DIR|${INSTALL_DIR}|" ${INSTALL_DIR}/kura/install/kura.service > /lib/systemd/system/kura.service
sed "s|INSTALL_DIR|${INSTALL_DIR}|" ${INSTALL_DIR}/kura/install/kura.service.nn > /lib/systemd/system/kura.service
systemctl daemon-reload
systemctl enable kura
chmod +x ${INSTALL_DIR}/kura/bin/*.sh
Expand Down
Loading