Kathy Lyons
07/26/2023, 11:26 AM[Unit]
Description=The osquery Daemon
After=network.service syslog.service
[Service]
TimeoutStartSec=0
EnvironmentFile=/etc/default/osqueryd
ExecStartPre=/bin/sh -c "if [ ! -f $FLAG_FILE ]; then touch $FLAG_FILE; fi"
ExecStartPre=/bin/sh -c "if [ -f $LOCAL_PIDFILE ]; then mv $LOCALPIDFILE $PIDFILE; fi"
ExecStart=/opt/osquery/bin/osqueryd \
--flagfile=$FLAG_FILE \
--config_path=$CONFIG_FILE \
--pid_file=/var/osquery/osqueryd.pidfile
Restart=on-failure
KillMode=control-group
KillSignal=SIGTERM
TimeoutStopSec=15
CPUQuota=20%
[Install]
WantedBy=multi-user.target
seph
seph
ExecStart
is meant to take a single argument. And the osqueryd command is spread across lines. \
is a common way to escape newlines. I don’t know how it’s supposed to work here.seph
Kathy Lyons
07/26/2023, 3:08 PM