Skip to content

Instantly share code, notes, and snippets.

@draganHR
Created January 29, 2016 09:19
Show Gist options
  • Save draganHR/ae91d88d0d2394e13ac2 to your computer and use it in GitHub Desktop.
Save draganHR/ae91d88d0d2394e13ac2 to your computer and use it in GitHub Desktop.
systemd custom login
#!/bin/bash
# /usr/bin/ttyentrypoint
error_exit() {
echo "[ERROR] $1"
exit
}
exec /bin/bash -c 'reset; echo "Do stuff..."; sleep 10;'
# /etc/systemd/system/[email protected]/override.conf
[Service]
Type=idle
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux -l /usr/bin/ttyentrypoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment