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

Fixes #20539: webapp preinst should run rudder agent check #2565

Merged
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
6 changes: 4 additions & 2 deletions rudder-webapp/SPECS/rudder-webapp.spec
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ if [ $1 -ne 1 ]
fi

getfacl --absolute-names --recursive /opt/rudder/etc/hooks.d/ > /tmp/rudder-hooks-upgrade
else
[ -x /opt/rudder/bin/rudder ] && /opt/rudder/bin/rudder agent check
fi


Expand All @@ -256,7 +258,7 @@ then
fi

%if 0%{?suse_version}
a2enmod rewrite dav dav_fs ssl version
a2enmod rewrite dav dav_fs ssl version

# Add required includes in the apache2 configuration
nextline=$(grep -A1 -E "^. /etc/sysconfig/rudder-webapp-apache$" /etc/sysconfig/apache2 | tail -n1)
Expand All @@ -275,7 +277,7 @@ then
sed -i 's%APACHE_MODULES="${APACHE_MODULES} rewrite dav dav_fs proxy proxy_http.*%# This sources the Rudder needed by Rudder\n. /etc/sysconfig/rudder-webapp-apache%' /etc/sysconfig/apache2
fi

# Remove old ncf-api-virtualenv conf, or else it will prevent apache start
# Remove old ncf-api-virtualenv conf, or else it will prevent apache start
rm -f /etc/%{apache_conf_dir}/ncf-api-virtualenv.conf


Expand Down
1 change: 1 addition & 0 deletions rudder-webapp/debian/preinst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ case "$1" in
echo 'root' > /opt/rudder/etc/uuid.hive
mkdir -p /var/rudder/cfengine-community/
echo "127.0.0.1" > /var/rudder/cfengine-community/policy_server.dat
[ -x /opt/rudder/bin/rudder ] && /opt/rudder/bin/rudder agent check
;;

upgrade)
Expand Down