#!/bin/sh

echo "Restore temporary settings backup - if used"
cp /tmp/relocateswap_bak /etc/event.d/relocateswap 

# just in case, clean up any existing flopswap.sudoers file:
rm /etc/sudoers.d/flopswap.sudoers

# now, create the file:
echo "user ALL = NOPASSWD: /opt/flopswap/script/*
user ALL = NOPASSWD: /opt/flopswap/bin/flopswap" > /etc/sudoers.d/flopswap.sudoers

update-sudoers

gtk-update-icon-cache -f /usr/share/icons/hicolor

exit 0
