Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A couple issues setting up systemd #25

@bmcgowan32

Description

@bmcgowan32

Sharing for others who might have similar problems. I am running mtools on a raspberry pi. When using the systemd templates in the repo, there were a few things that didn't work, so Im sharing my workarounds

  1. When copying the "btmon.service" file from /usr/local/mtools/etc/systemd to /etc/systemd/system, it needs to be renamed to "[email protected]". Without this change you will get an error that the service file is missing when you try to enable the btmon instance using the "btmon@" command.
  2. My version of raspian uses python3 as the default python interpreter. This wont work with mtools out of the box, and you'll get startup errors due to some syntax differences. Since I have other python scripts running, I didn't want to change the default python to python2 to support the provided systemd service script for btmon. Instead, I edited the [email protected] file and added the path to my python 2 install in the ExecStart command:

ExecStart=/usr/bin/python2.7 /usr/local/mtools/bin/btmon.py --quiet --config-file=/usr/local/mtools/etc/btmon-%I.cfg

Hopefully this will be helpful for others!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions