I have two processes that need to run under different conditions (Service1 has to be run from a specific TTY and service2 cannot be run under that TTY.) so they have to be run from different systemd services. But I want them to run back to back. So I want to trigger just service1 with a timer but then I want service2 to be triggered right after service1.
Is there a graceful way to achieve this?
[Unit] Description=blank the cursor [Service] StandardInput=tty-force StandardOutput=tty TTYPath=/dev/tty1 Type=simple ExecStart=tput civis > /dev/tty1
[Unit] Description=random wallpaper change script [Service] SyslogIdentifier=wallpaper.sh User=deanresin Type=simple ExecStart=/bin/bash /home/deanresin/scripts/wallpaper.sh
I want service1 to trigger service2 after it completes.