dotfiles/autologin/install.sh

13 lines
407 B
Bash
Raw Normal View History

2020-09-17 16:02:24 +00:00
#!/bin/bash
DIR=$(readlink -f $(dirname $0))
. $DIR/../env.sh
read -l -P 'Please enter autologin username (empty to skip): ' username
if [ -z "$username" ]; then
echo skip autologin setup
else
sudo mkdir -p /etc/systemd/system/getty@tty1.service.d
sed -r "s/USERNAME/$username/g" $DIR/systemd/getty1-override.conf | \
sudo tee /etc/systemd/system/getty@tty1.service.d/override.conf
fi