[Unit] Description=Victor engine daemon SourcePath=/anki/bin/vic-engine PartOf=anki-robot.target Wants=vic-anim.service After=vic-anim.service [Service] PermissionsStartOnly=true EnvironmentFile=/anki/etc/vic-engine.env ExecStartPre=/bin/chown engine:root /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ExecStartPre=/bin/chown engine:root /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed ExecStartPre=/bin/chown engine:root /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq ExecStartPre=/bin/chgrp anki /dev/block/bootdevice/by-name/emr ExecStartPre=/bin/chown engine /dev/i2c-6 ExecStartPre=/bin/chown engine /dev/kgsl-3d0 ExecStartPre=/sbin/export-gpio 94 ExecStartPre=/sbin/export-gpio 0 # Sleep for 100 milliseconds to give /etc/udev/rules.d/gpio.rules time to chown engine gpio0|gpio94 ExecStartPre=/bin/sleep 0.1 ExecStart=/usr/bin/logwrapper /anki/bin/vic-engine $VIC_ENGINE_OPTS ExecStopPost=/anki/bin/vic-on-exit Restart=no User=engine Group=anki UMask=0002 [Install] WantedBy=anki-robot.target