<div dir="ltr"><div><div><div><div>Hi all,<br><br></div>I had a problem similar to this one:<br><a href="https://www.redhat.com/archives/spacewalk-list/2015-December/msg00046.html">https://www.redhat.com/archives/spacewalk-list/2015-December/msg00046.html</a><br><br></div><div>Here's how I fixed the problem. Please bear with me, I'm a noob and this is just a temp fix.<br></div><div>I'm hoping you guys will find a better way to implement this.<br></div><div><br></div>The spacewalk-hostname-rename script would fail with the following output:<br><br>Stopping rhn-satellite services ... OK<br>Testing DB connection ... FAILED<br>Your database isn't running.<br>Fix the problem and run /bin/spacewalk-hostname-rename again<br><br></div><div>My database is postgresql, but the script was looking at a wrong location:<br><br>if [ -x /etc/init.d/postgresql ]; then<br>        DB_SERVICE="postgresql"<br><br></div><div>The thing is, my postgresql was NOT located at /etc/init.d/postgresql (I'm guessing this is related to the switch to systemd)<br><br></div><div>I found the real location of my postgresql by running:<br><br>systemctl status postgresql<br>● postgresql.service - PostgreSQL database server<br>   Loaded: loaded /usr/lib/systemd/system/postgresql.service<br><br></div><div><br>So I decided NOT to mess with the script (I'm a complete noob), but instead I created a symbolic link to the actual file.<br><br></div><div>ln -s /usr/lib/systemd/system/postgresql.service /etc/init.d/postgresql<br></div><div><br></div><div><br>The script works now :)<br></div><div><br></div><div><br></div>My spacewalk host is running on CentOS 7 minimal.<br><br></div>Regards,<br clear="all"><div><div><div><br><div><div><div><br>-- <br><div class="gmail_signature"><div dir="ltr">Damien Daco<br><br><a href="http://www.dacodam.com" target="_blank">www.dacodam.com</a><br><br></div></div>
</div></div></div></div></div></div></div>