-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This package should get pulled in when yggdrasil >=0.4.z is installed. When installed, it checks whether yggdrasild.service is enabled. If not, it does nothing. If enabled, this package tweaks yggdrasil's config file to account for the newly needed config options. Additionally, it disables the yggdrasild service and enables yggdrasil.service. Our worker is left to be activated through dbus.
- Loading branch information
1 parent
47e3f36
commit d9b72c8
Showing
5 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/client/foreman_ygg_migration/foreman_ygg_migration.spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Name: foreman_ygg_migration | ||
Version: 0.0.1 | ||
Summary: A helper package to ease transition from yggdrasil 0.2.z to 0.4.z | ||
Release: 1%{?dist} | ||
License: MIT | ||
|
||
Supplements: yggdrasil >= 0.4.0 | ||
Requires: yggdrasil >= 0.4.0 | ||
|
||
%description | ||
A helper package to ease transition from yggdrasil 0.2.z to 0.4.z | ||
|
||
%post | ||
if systemctl is-enabled yggdrasild >/dev/null 2>/dev/null; then | ||
grep -Pq '^server' /etc/yggdrasil/config.toml || sed -i 's/broker.*=/server =/' /etc/yggdrasil/config.toml | ||
grep -Pq '^prefix' /etc/yggdrasil/config.toml || echo 'prefix = "yggdrasil"' >>/etc/yggdrasil/config.toml | ||
grep -Pq '^data-host' /etc/yggdrasil/config.toml || echo 'data-host = ""' >>/etc/yggdrasil/config.toml | ||
|
||
if grep -q FOREMAN_YGG_WORKER_WORKDIR /etc/systemd/system/yggdrasild.service.d/* 2>/dev/null; then | ||
mkdir -p /etc/systemd/system/com.redhat.Yggdrasil1.Worker1.foreman.service.d/ | ||
cp -r /etc/systemd/system/yggdrasild.service.d/* /etc/systemd/system/com.redhat.Yggdrasil1.Worker1.foreman.service.d/ | ||
fi | ||
|
||
systemctl disable --now yggdrasild | ||
systemctl enable --now yggdrasil | ||
fi | ||
|
||
%files | ||
|
||
%changelog | ||
* Thu Oct 03 2024 Adam Ruzicka <[email protected]> - 0.0.1-1 | ||
- Initial packaging |