All posts by Null

Using Postfix to Forward to GMail

apt-get install libsasl2-modules postfix bsd-mailx
Internet site and FQDN

vi /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd

vi /etc/postfix/main.cf
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes

vi /etc/postfix/cacert.pem

systemctl restart postfix

Building GPS Clock on Pi w/ Debian Stretch

Start with Raspbian Stretch Lite

Install most current packages:
apt-get update
apt-get upgrade
apt-get dist-upgrade

Clean up packages:
aptitude search ‘~o’
apt-get autoremove

reboot

Test GPS Sentences:
cat /dev/ttyAMA0

Limit GPS Sentences:
#GPZDA
/bin/echo -e ‘$PMTK314,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0*29\r\n’ > /dev/ttyAMA0

#GPRMC
/bin/echo -e ‘$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n’ > /dev/ttyAMA0

Configure Pi:
raspi-config
configure local >> [*] en_US.UTF-8 UTF-8
timezone >> Chicago
advanced >> Expand filesystem

reboot

Get and Unpack NTP source:
wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p12.tar.gz
tar -zxvf ntp-4.2.8p12.tar.gz

Compile NTP:
apt-get install libcap-dev

./configure –disable-all-clocks –disable-parse-clocks –without-lineeditlibs –enable-NMEA –enable-LOCAL-CLOCK –enable-SHM –enable-linuxcaps –enable-ATOM –enable-pps –with-sntp=no –prefix=/usr

Restarting GPS Clocks

Need to change hostnames and IPs for both clocks before running the commands below:


mount 10.1.1.101:/NAS/common /common
mount 10.1.1.101:/NAS/backup /backup
mount 10.1.1.101:/NAS/log/hcpi003 /var/log
mount 10.1.1.101:/NAS/admin /admin
/etc/init.d/rsyslog restart

/etc/init.d/ntp stop
/usr/sbin/ntpdate 0.pool.ntp.org

/bin/echo -e '$PMTK314,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0*29\r\n' > /dev/ttyAMA0

/etc/init.d/ntp start
watch ntpq -p 127.0.0.1

Debian Upgrade 8 to 9

Note: Disable Network Bonding at switch and OS


# aptitude search '~o'

# apt-get update
# apt-get upgrade
# apt-get dist-upgrade

# dpkg -C

# apt-mark showhold

/etc/apt/sources.list
STRETCH:
deb http://httpredir.debian.org/debian stretch main
deb http://httpredir.debian.org/debian stretch-updates main
deb http://security.debian.org stretch/updates main

# apt-get update

# apt list --upgradable

# apt-get upgrade
# apt-get dist-upgrade

# aptitude search '~o'
# aptitude purge ~o (removes obsolete packages)

# apt-get autoremove

Remove ^rc packages
# dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge

# reboot

Freelancer: Ship Codes

marketgood = gf1_package, 1, -1, 0, 0, 1, 1, 1 STARFLIER
marketgood = gf2_package, 1, -1, 0, 0, 1, 1, 1 STARTRACKER
marketgood = gf4_package, 1, -1, 0, 0, 1, 1, 1 HAWK
marketgood = gf5_package, 1, -1, 0, 0, 1, 1, 1 FALCON
marketgood = gf6_package, 1, -1, 0, 0, 1, 1, 1 EAGLE
marketgood = bwf_package, 1, -1, 0, 0, 1, 1, 1 DAGGER
marketgood = bwe_package, 1, -1, 0, 0, 1, 1, 1 SABRE
marketgood = bwe2_package, 1, -1, 0, 0, 1, 1, 1 DROMEDARY
marketgood = bwfr_package, 1, -1, 0, 0, 1, 1, 1 STILETTO
marketgood = cof_package, 1, -1, 0, 0, 1, 1, 1 LEGIONAIRE
marketgood = coe_package, 1, -1, 0, 0, 1, 1, 1 CENTURION
marketgood = coe2_package, 1, -1, 0, 0, 1, 1, 1 TITAN
marketgood = lf_package, 1, -1, 0, 0, 1, 1, 1 PATRIOT
marketgood = le_package, 1, -1, 0, 0, 1, 1, 1 DEFENDER
marketgood = lfr_package, 1, -1, 0, 0, 1, 1, 1 RHINO
marketgood = bf_package, 1, -1, 0, 0, 1, 1, 1 CAVALIER
marketgood = be_package, 1, -1, 0, 0, 1, 1, 1 CRUSADER
marketgood = bfr_package, 1, -1, 0, 0, 1, 1, 1 CLYDESDALE
marketgood = kf_package, 1, -1, 0, 0, 1, 1, 1 DRONE
marketgood = ke_package, 1, -1, 0, 0, 1, 1, 1 DRAKE
marketgood = kfr_package, 1, -1, 0, 0, 1, 1, 1 DRAGON
marketgood = rf_package, 1, -1, 0, 0, 1, 1, 1 BANSHEE
marketgood = re_package, 1, -1, 0, 0, 1, 1, 1 VALKYRIE
marketgood = rfr_package, 1, -1, 0, 0, 1, 1, 1 HUMPBACK
marketgood = pf_package, 1, -1, 0, 0, 1, 1, 1 BLOODHOUND
marketgood = pe_package, 1, -1, 0, 0, 1, 1, 1 WOLFHOUND
marketgood = pfr_package, 1, -1, 0, 0, 1, 1, 1 MULE
marketgood = bhf_package, 1, -1, 0, 0, 1, 1, 1 PIRANHA
marketgood = bhe_package, 1, -1, 0, 0, 1, 1, 1 BARRACUDA
marketgood = bhe2_package, 1, -1, 0, 0, 1, 1, 1 HAMMERHEAD
marketgood = oe_package, 1, -1, 0, 0, 1, 1, 1 ANNUBIS