This file contains hidden or 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
#!/bin/sh | |
# In lieu of memory-log.sh | |
# mount /var/log on tmpfs to not wear down the eMMC flash chip | |
ISTMPFS=$(/bin/mount | /bin/grep -c "/var/log type tmpfs") | |
if [ "$ISTMPFS" = 0 ]; then | |
mount -t tmpfs -o size=100M tmpfs /var/log | |
#if we mount while the programs are still active and they keep their logfiles open, they keep on writing to the |
This file contains hidden or 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
#!/bin/sh | |
# Adds your password and SSH pub key to 3 users. root, tesla, yourUsername | |
if [ "$accountUserToSaveToCar" = "yourUsername" ] || [ -z "$accountUserToSaveToCar" ]; then | |
echo "Please set config parameter accountUserToSaveToCar" | |
exit 1 | |
fi | |
if [ "$accountPassToSaveToCar" = "myCarIsRooted" ] || [ -z "$accountPassToSaveToCar" ]; then |
This file contains hidden or 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
#!/bin/sh | |
cidIp="192.168.90.100" | |
cidPort="4070" | |
# shellcheck disable=SC2154 | |
mainPath="$homeOfLunars/scripts" | |
pattern=AccessPopup | |
last_command="NoNe" | |
if ps ax | grep "$0" | grep -v $$ | grep bash | grep -v grep; then | |
echo "The script is already running." |
This file contains hidden or 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
#!/bin/sh | |
# In lieu of copy-tokens-to-ic.sh and tokens-to-php.sh | |
while inotifywait -e modify /var/etc/saccess/tesla1; do | |
case $TOKENS_IC in | |
true|1|on|yes) | |
echo "Copying tokens to ic:/home/tesla/" | |
scp -qr /var/etc/saccess/tesla* 192.168.90.101:/home/tesla/ | |
;; |
This file contains hidden or 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
#!/bin/sh | |
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin | |
# Changed from /home/ because a factory reset will wipe out Lunars in /home/ but will remain in /var/ | |
export homeOfLunars="/var/lunars" | |
# Turn on/off firewall to lock out Tesla (true/false) | |
export FIREWALL_ON="true" |
This file contains hidden or 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
#!/bin/sh | |
# Allows autosteer at all speeds | |
# Does not disable autopilot nag | |
KEY1="GUI_disableAutosteerRestrictions" | |
KEY2="GUI_handsOnRequirementDisable" | |
WANTSTATE="true" | |
while true; do |
This file contains hidden or 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
#!/bin/sh | |
# In lieu of block-tesla-ssh.sh | |
# Clean up tables | |
/sbin/iptables -D INPUT -p udp --dport 18466 -m string --algo bm --string 'req' -j LOG_REJECT > /dev/null 2>&1 | |
/sbin/iptables -D OUTPUT -s 10.2.3.0/24 -d 10.2.3.1/32 -j ACCEPT > /dev/null 2>&1 | |
/sbin/iptables -D INPUT -s 10.2.3.1/32 -d 10.2.3.0/24 -j ACCEPT > /dev/null 2>&1 | |
/sbin/iptables -D INPUT -i parrot -p tcp -m tcp --dport 4035 -j LOG_REJECT > /dev/null 2>&1 | |
/sbin/iptables -D INPUT -i tun0 -p tcp -m tcp --dport 4035 -j LOG_REJECT > /dev/null 2>&1 | |
/sbin/iptables -D INPUT -i wwan0 -p tcp -m tcp --dport 4035 -j LOG_REJECT > /dev/null 2>&1 |