Files
nordvpn-bin/nordvpn-bin.install
2024-10-02 17:51:42 -03:00

42 lines
929 B
Plaintext

post_install() {
echo ':: In order to enable nordvpn you have to start the following service:'
echo ' sudo systemctl enable --now nordvpnd'
echo ':: You have to add yourself to the nordvpn group:'
echo " sudo gpasswd -a USERNAME nordvpn"
echo ':: You then have to restart for the group to be created:'
echo " reboot"
for lib in /usr/lib/nordvpn/*.so ; do
if [ -f "$lib" ] ; then
ln -s $lib /usr/lib/
fi
done
}
pre_install() {
if [ -d /var/lib/nordvpn/data/ ]; then
chattr -i /var/lib/nordvpn/data/*
fi
}
pre_upgrade() {
chattr -i /var/lib/nordvpn/data/*
}
post_upgrade() {
for lib in /usr/lib/nordvpn/*.so ; do
if [ -f "$lib" ] ; then
ln -sf $lib /usr/lib/
fi
done
}
pre_remove() {
chattr -i /var/lib/nordvpn/data/*
for lib in /usr/lib/nordvpn/*.so ; do
if [ -f "$lib" ] ; then
unlink /usr/lib/$(echo $lib | cut -d '/' -f 5)
fi
done
}