Simple task. I have a user service that is installed globally on the system (i.e. in a path like /usr/lib/systemd/user). I now want to enable this service for all users on the system (i.e. make it enabled by default. I don't care whether users can disable it for themselves again or not). I do know I can enable the service as user via systemctl --user enable my.service - but that obviously only activates the service for the current user.
Not shure if relevant, but this is how the corresponding unit file looks. I tested it and it works:
[Unit]
Description=My App
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/myapp --systemd-log
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=default.target