User Tools

Site Tools


cfnet-fs:system_service:index

Running cfnet-fs as a System Service

cfnet-fs can be run as a system service so that is runs whenever the system its running on boots.

  1. Copy the cfnet-fs executable to /usr/local/bin/:
    sudo cp cfnet-fs /usr/local/bin/
    sudo chmod +x /usr/local/bin/cfnet-fs
  2. Create a /etc/systemd/system/cfnet-fs.service file with the following contents:
    [Unit]
    Description=Run cfnet-fs filesystem service
    After=multi-user.target
    
    [Service]
    Type=oneshot
    RemainAfterExit=true
    ExecStart=/usr/local/bin/cfnet-fs /tmp/cfnet-fs /dev/i2c-0 /dev/i2c-1 /dev/i2c-3
    
    [Install]
    WantedBy=multi-user.target
  3. Enable the service so it will start whenever the system boots:
    sudo systemctl enable cfnet-fs.service
  4. Reboot, or run the following to start the service immediately:
    sudo systemctl start cfnet-fs.service
cfnet-fs/system_service/index.txt · Last modified: by 127.0.0.1