#!/bin/bash

rm /var/cache/astra-mobile/start_setup_wizard

sed -i "s/AutoLoginEnable=.*/AutoLoginEnable=false/" /etc/X11/fly-dm/fly-dmrc
sed -i "s/NoPasswordUnlock=.*/NoPasswordUnlock=false/" /etc/xdg/kscreenlockerrc
sed -i "s/NoPasswordUnlock=.*/NoPasswordUnlock=false/" /home/administrator/.config/kscreenlockerrc

cat /etc/pam.d/login | grep pam_parsec | xargs -I{} sed -i "/{}/ s/^#*//" /etc/pam.d/login

systemctl disable getty@
systemctl enable fly-dm

rm -rf /etc/systemd/system/getty@.service.d

bashrc="/home/administrator/.bashrc"
sed -i '/#oem_hook_begin/,/#oem_hook_end/{//!d;}' $bashrc
sed -i '/#oem_hook_begin/d' $bashrc
sed -i '/#oem_hook_end/d' $bashrc
