Forked from sebastianhaas/socketcan-interface.service
Last active
November 1, 2020 21:50
-
-
Save splatch/e58b03c0c5d8740eba9b61971614e80e to your computer and use it in GitHub Desktop.
An example systemd template unit file to setup a SocketCAN interface on startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=SocketCAN interface %i with a baudrate of 500000 | |
After=multi-user.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/sbin/ip link set %i type can bitrate 500000 ; /sbin/ifconfig %i up | |
ExecReload=/sbin/ifconfig %i down ; /sbin/ip link set %i type can bitrate 500000 ; /sbin/ifconfig %i up | |
ExecStop=/sbin/ifconfig %i down | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment