Score:0

Service Active: inactive (dead)

br flag

This is the script:

#!/bin/bash
setterm --blank 1 --powerdown 2

This is the service:

[Unit]
Description=Blank screen after 1 min and turn it off after 2 min. Any keypress will turn it back on.
After=ssh.service

[Service]
Type=oneshot
Environment=TERM=linux
StandardOutput=tty
TTYPath=/dev/console
ExecStart=/home/USER/.boot-scripts/screen-off.sh

[Install]
WantedBy=local.target

if I enable it and start it, it work but when I reboot the server nothing happened. If I verified the status of the service this is what I get:


 ● screen-off.service - Blank screen after 1 min and turn it off after 2 min. Any keypress will turn it back on.
     Loaded: loaded (/etc/systemd/system/screen-off.service; enabled; vendor preset: enabled)
     Active: inactive (dead)

Any idea why it's not starting at boot and I have to do it manually?

Thanks

nocturno avatar
br flag
Can you tell me what is a norma systemd target on the boot path for Ubuntu? I just copied from here https://askubuntu.com/a/1194293/1377913 Thank you
Score:0
br flag

Thank to the help of – user535733 (which by mistake I delete the comment) local.target is not a normal systemd target on the boot path of an Ubuntu system. I move it to multi-user.target and now is working!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.