I'm trying to get a script to run after gdm3 starts but before a user logs in. Reason is the script needs an active monitor, but if there's a power outage, I want the system to boot back to functional when power is restored.
I've tried various iterations based on other answers, but none of them seem to be performing the way I need it to. I'm also trying to contain this in my custom systemd service definition and not touch any other service definitions, if possible. Here's my current (not working) iteration:
[Unit]
Description=Testing
After=network.target network-online.target gdm3.service
[Service]
Type=oneshot
User=root
Group=root
GuessMainPID=no
ExecStart=/bin/bash /home/user/test.sh
Restart=never
[Install]
WantedBy=multi-user.target
Reboot -> Nothing. After I login -> Nothing. I can manually start it and it is enabled. I reloaded the daemon after any edits and still nothing.