Skip to content

Commit

Permalink
fixed editing crontab
Browse files Browse the repository at this point in the history
  • Loading branch information
neopar committed Jan 24, 2025
1 parent 2f12f01 commit 859c71a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions debian/neobotix-tools/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ visudo -c -f /etc/sudoers.d/neobotix
sed -i 's/APT::Periodic::Update-Package-Lists "1"/APT::Periodic::Update-Package-Lists "0"/' /etc/apt/apt.conf.d/20auto-upgrades

# Setup cron job for configuring can interface
#(crontab -l 2>/dev/null; echo "@reboot /opt/neobotix/tools/enable_can0.sh") | crontab -
#grep '/opt/neobotix/tools/enable_can0.sh' /etc/crontab || echo '@reboot /opt/neobotix/tools/enable_can0.sh' >> /etc/crontab

if ! crontab -l | grep -q '/opt/neobotix/tools/enable_can0.sh'; then (crontab -l 2>/dev/null; echo "@reboot /opt/neobotix/tools/enable_can0.sh") | crontab -; fi
if ! crontab -l | grep -q '/opt/neobotix/tools/enable_multicast_lo.sh'; then (crontab -l 2>/dev/null; echo "@reboot /opt/neobotix/tools/enable_multicast_lo.sh") | crontab -; fi
if ! crontab -l | grep -q '/opt/neobotix/tools/enable_can0.sh'; then crontab -l 2>/dev/null | { cat; echo "@reboot /opt/neobotix/tools/enable_can0.sh"; } | crontab -; fi
if ! crontab -l | grep -q '/opt/neobotix/tools/enable_multicast_lo.sh'; then (crontab -l 2>/dev/null | { cat; echo "@reboot /opt/neobotix/tools/enable_multicast_lo.sh"; } | crontab -; fi

# Setup udev rules for serial converter
echo 'SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ENV{ID_VENDOR}=="FTDI", ENV{ID_MODEL_ID}=="6010", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="neo-relayboard"' > /etc/udev/rules.d/99-usb-serial.rules
Expand Down

0 comments on commit 859c71a

Please sign in to comment.