Is there a way to start a service using systemd and direct it's logging to /dev/null WITHOUT including the proper lines in the unit file.
For example, A file that has the StandardOutput and StandardErorr directives set to null will send logs to /dev/null.
[Unit] Description=MyService [Service] ExecStart=/usr/bin/start_myservice.sh Restart=always StandardOutput=null StandardError=inherit [X-Fleet] Global=true
This service can be started with
systemctl start MyService.service
My question is whether there is a way to start a service that does NOT have the StandardOutput and StandardError directives set, and force it's log to go to /dev/null. Maybe with a command like
systemctl start OtherService.service --disable-logging