Blob Blame History Raw
#!/bin/bash
if [ `grep memlock /etc/security/limits.conf |grep unlimited |wc -l` -le 0 ]; then 
	echo "*             -   memlock        unlimited" >> /etc/security/limits.conf
	echo "*          soft   memlock        unlimited" >> /etc/security/limits.conf
	echo "*          hard   memlock        unlimited" >> /etc/security/limits.conf
	echo "- Changing max locked memory to unlimited (in /etc/security/limits.conf)"
	echo "  Please log out from the shell and login again in order to update this change "
	echo "  Read more about this topic in the VMA's User Manual"
fi

/sbin/ldconfig

if type systemctl >/dev/null 2>&1; then
    systemctl --no-reload enable vma.service >/dev/null 2>&1 || true
elif [ -e /sbin/chkconfig ]; then
    /sbin/chkconfig --add vma
elif [ -e /usr/sbin/update-rc.d ]; then
    /usr/sbin/update-rc.d vma defaults
else
    /usr/lib/lsb/install_initd /etc/init.d/vma
fi