Skip to content
Snippets Groups Projects
Commit e2584bd5 authored by Jan Mach's avatar Jan Mach
Browse files

Fixed the issue with misbehaving installation of geoipupdate tool

Installation of geoipudate tool removes the symlink, that was already
prepared for everything to work seamlesly.

(Redmine issue: #7548)
parent b62924e6
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,9 @@ function ensure_link { ...@@ -13,6 +13,9 @@ function ensure_link {
if [ -f $2 ] ; then if [ -f $2 ] ; then
rm -f $2 rm -f $2
fi fi
if [ -d $2 ] ; then
rmdir $2
fi
ln -s $1 $2 ln -s $1 $2
fi fi
} }
......
...@@ -27,8 +27,6 @@ chmod g+w /vagrant ...@@ -27,8 +27,6 @@ chmod g+w /vagrant
print_subtitle 'Linking configuration files' print_subtitle 'Linking configuration files'
ensure_link /vagrant/vagrantenv/system/.bashrc /root/.bashrc ensure_link /vagrant/vagrantenv/system/.bashrc /root/.bashrc
ensure_link /vagrant/vagrantenv/system/.bashrc /home/vagrant/.bashrc ensure_link /vagrant/vagrantenv/system/.bashrc /home/vagrant/.bashrc
ensure_link /vagrant/data/GeoIP.conf /etc/GeoIP.conf
ensure_link /vagrant/data/geoip /usr/share/GeoIP
print_subtitle 'Installing essential dependencies' print_subtitle 'Installing essential dependencies'
apt-get update -qq \ apt-get update -qq \
......
...@@ -49,11 +49,13 @@ if [ ! -f /usr/bin/grunt ] && [ ! -e /usr/bin/grunt ] ; then ...@@ -49,11 +49,13 @@ if [ ! -f /usr/bin/grunt ] && [ ! -e /usr/bin/grunt ] ; then
fi fi
print_subtitle 'Installing GeoIPupdate tool' print_subtitle 'Installing GeoIPupdate tool'
ensure_link /vagrant/data/GeoIP.conf /etc/GeoIP.conf
if [ ! -f /usr/bin/geoipupdate ] && [ ! -e /usr/bin/geoipupdate ] ; then if [ ! -f /usr/bin/geoipupdate ] && [ ! -e /usr/bin/geoipupdate ] ; then
wget -O /tmp/geoipupdate_4.6.0_linux_amd64.deb https://github.com/maxmind/geoipupdate/releases/download/v4.6.0/geoipupdate_4.6.0_linux_amd64.deb && \ wget -O /tmp/geoipupdate_4.6.0_linux_amd64.deb https://github.com/maxmind/geoipupdate/releases/download/v4.6.0/geoipupdate_4.6.0_linux_amd64.deb && \
dpkg -i /tmp/geoipupdate_4.6.0_linux_amd64.deb && \ dpkg -i /tmp/geoipupdate_4.6.0_linux_amd64.deb && \
rm -f /tmp/geoipupdate_4.6.0_linux_amd64.deb rm -f /tmp/geoipupdate_4.6.0_linux_amd64.deb
fi fi
ensure_link /vagrant/data/geoip /usr/share/GeoIP
print_subtitle 'Creating Mentat user for development' print_subtitle 'Creating Mentat user for development'
if ! getent passwd ${MENTAT_USER} > /dev/null 2>&1; then if ! getent passwd ${MENTAT_USER} > /dev/null 2>&1; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment