Skip to content

Commit

Permalink
Provide RPM support (#140)
Browse files Browse the repository at this point in the history
[#85] Provide RPM support

Fixed commands execution errors handling.

Signed-off-by: Konstantina Gramatova <[email protected]>
  • Loading branch information
konstantina-gramatova authored Sep 21, 2022
1 parent 160ec37 commit 692549f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build/postinst_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [ $1 -eq 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
/usr/lib/systemd/systemd-update-helper install-system-units containerd.service || :

# Configure Mosquitto to look for the suite-connector config file
echo "include_dir /etc/mosquitto/conf.d" >> /etc/mosquitto/mosquitto.conf
echo "include_dir /etc/mosquitto/conf.d" >> /etc/mosquitto/mosquitto.conf || :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units mosquitto.service || :

# Install the Kanto services
Expand Down
17 changes: 8 additions & 9 deletions build/postrm_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ if [ $1 -ge 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
# Package upgrade, not uninstall

# Mark the Kanto services for restart, including ones that are usually disabled by default
# Shouldn't we mark the services in the pre and call daemon reload-restart in the post - it's not handled by default
/usr/lib/systemd/systemd-update-helper mark-restart-system-units suite-connector.service
/usr/lib/systemd/systemd-update-helper mark-restart-system-units local-digital-twins.service|| :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units suite-bootstrapping.service|| :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units container-management.service|| :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units file-upload.service|| :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units software-update.service|| :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units file-backup.service|| :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units system-metrics.service|| :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units suite-connector.service || :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units local-digital-twins.service || :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units suite-bootstrapping.service || :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units container-management.service || :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units file-upload.service || :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units software-update.service || :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units file-backup.service || :
/usr/lib/systemd/systemd-update-helper mark-restart-system-units system-metrics.service || :
fi

if [ $1 -eq 0 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
Expand Down
2 changes: 1 addition & 1 deletion build/prerm_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ if [ $1 -eq 0 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
/usr/lib/systemd/systemd-update-helper remove-system-units suite-connector.service || :

# Reload systemd
/usr/lib/systemd/systemd-update-helper system-reload
/usr/lib/systemd/systemd-update-helper system-reload || :
fi

0 comments on commit 692549f

Please sign in to comment.