Revision 663c6342
Added by Dominic Cleal almost 10 years ago
foreman-proxy/foreman-proxy.spec | ||
---|---|---|
useradd -r -g foreman-proxy -d %{homedir} -s /sbin/nologin -c "Foreman Proxy deamon user" foreman-proxy
|
||
|
||
# Keep monolithic config in case it's replaced with the new default
|
||
if [ $1 == 2 ]; then
|
||
if [ $1 == 2 -a ! -e %{_sysconfdir}/%{name}/settings.d ]; then
|
||
test -e %{_localstatedir}/lib/rpm-state/%{name} || mkdir %{_localstatedir}/lib/rpm-state/%{name}
|
||
cp %{_sysconfdir}/%{name}/settings.yml %{_localstatedir}/lib/rpm-state/%{name}/settings.yml.orig
|
||
fi
|
||
... | ... | |
|
||
%post
|
||
# Migrate legacy monolithic proxy config
|
||
if [ $1 == 2 ]; then
|
||
if [ $1 == 2 -a -e %{_localstatedir}/lib/rpm-state/%{name}/settings.yml.orig ]; then
|
||
pushd %{_localstatedir}/lib/rpm-state/%{name} >/dev/null
|
||
if %{homedir}/extra/migrate_settings.rb settings.yml.orig; then
|
||
mv settings.yml %{_sysconfdir}/%{name}
|
Also available in: Unified diff
refs #6275 - only run migration on upgrade when settings.d is absent