dev: automated commit - 2025-07-14 16:20:38
This commit is contained in:
parent
5b556eee5a
commit
edc366f873
1 changed files with 34 additions and 0 deletions
34
runs/config
Executable file
34
runs/config
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
# NAME: Configure autologin
|
||||
# REQUIRES: sudo
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Source common functions
|
||||
source "$(dirname "$0")/../common.sh" || {
|
||||
echo "[ERROR] Could not source common.sh" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
configure_autologin() {
|
||||
log_info "Configuring autologin"
|
||||
|
||||
sudo mkdir -p /etc/systemd/system/getty@tty1.service.d
|
||||
sudo tee /etc/systemd/system/getty@tty1.service.d/override.conf >/dev/null <<EOF
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/usr/bin/agetty --autologin forbi --noclear %I \$TERM
|
||||
EOF
|
||||
}
|
||||
|
||||
main() {
|
||||
init_script
|
||||
|
||||
configure_autologin
|
||||
|
||||
log_info "Autologin configured successfully"
|
||||
|
||||
finish_script 0
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue