[Unit] Description=The osquery Daemon After=network.service syslog.service fleet.service sshd.service [Service] TimeoutStartSec=60 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 $LOCAL_PIDFILE $PIDFILE; fi" ExecStart=/opt/osquery/bin/osqueryd \ --extensions_autoload=/etc/osquery/extensions.load \ --disable_extensions=false \ --enroll_secret_path=/home/student/fleetsecret \ --tls_server_certs=/etc/fleet.cert \ --tls_hostname=fleet.lab.internal:8443 \ --host_identifier=uuid \ --enroll_tls_endpoint=/api/v1/osquery/enroll \ --config_plugin=tls \ --config_tls_endpoint=/api/v1/osquery/config \ --config_refresh=10 \ --disable_distributed=false \ --distributed_plugin=tls \ --distributed_interval=10 \ --distributed_tls_max_attempts=3 \ --distributed_tls_read_endpoint=/api/v1/osquery/distributed/read \ --distributed_tls_write_endpoint=/api/v1/osquery/distributed/write \ --logger_plugin=tls \ --logger_tls_endpoint=/api/v1/osquery/log \ --logger_tls_period=10 Restart=on-failure KillMode=control-group KillSignal=SIGTERM CPUQuota=20% [Install] WantedBy=multi-user.target