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
#!/bin/bash | |
# NOTE : This is a very rudimentary and dumb script. With little more work this can be made to accept | |
# command line arguments which override those specified in the setup.sh file | |
public_ip_file='/tmp/public_ip_address' | |
first_arg=$1 | |
fetch_public_ip() { | |
echo "Fetching public ip address from automation.whatismyip.com service" |
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
#!/bin/sh | |
set -e | |
SETTING_DATA_PATH=".ztemtapp/ZTEEVDO" | |
#e.g. /var/lib/dpkg/info | |
# when execs "sudo dpkg -P xxxx", 1st execute this script with "remove" arg, then execute this script with "purge" arg | |
if [ "$1" = "remove" ] ; then | |
sudo sed '/ztemt/d' /etc/init.d/rc.local > tmpfile; sudo mv -f tmpfile /etc/init.d/rc.local; sudo chmod 0755 /etc/init.d/rc.local |