From 77b7333e8146384db39b1feea6f8128ddbb8018a Mon Sep 17 00:00:00 2001 From: Russ Kollmansberger Date: Sun, 24 May 2026 09:00:52 -0500 Subject: [PATCH] Add install.sh --- install.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..6308d31 --- /dev/null +++ b/install.sh @@ -0,0 +1,50 @@ +# Require APT to utilizelocal proxy +echo "Acquire::http::proxy \"http://192.168.128.185:3142\";" >> /etc/apt/apt.conf.d/02proxy + +# Set TimeZone :) +timedatectl set-timezone America/Chicago + +# Perform update / upgrade of all existing packages and repos +apt update && apt upgrade -y + +# Install curl and git if not present +apt install curl git ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 \ + libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 \ + libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 \ + libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 \ + libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils -y + +# Add NodeSource repository (replace 22.x with your desired version, e.g., 20.x, 18.x) +curl -fsSL https://deb.nodesource.com/setup_22.x | bash - + +# Install Node.js +apt install -y nodejs + +# Git clone the actual-helpers repo +cd /opt +git clone https://git.kollman.net/rlkollman/actual-helpers + +# Install all dependencies +cd /opt/actual-helpers +npm install + +# Write crontab file with scheduled tasks +echo "" >> /etc/crontab +echo "# Sync ActualBudget Bank Accounts daily at 2 AM" >> /etc/crontab +echo "00 2 * * * root cd /opt/actual-helpers && node sync-banks.js > /dev/null" >> /etc/crontab +echo "05 2 * * * root cd /opt/actual-helpers && node update-investments.js > /dev/null" >> /etc/crontab +echo "" >> /etc/crontab +echo "# Sync ActualBudget Vehicles & Apply Mortgage Interest on the 1st day of every month at 3 AM" >> /etc/crontab +echo "00 3 1 * * root cd /opt/actual-helpers && node kbb.js > /dev/null" >> /etc/crontab +echo "15 3 6 * * root cd /opt/actual-helpers && node apply-interest.js > /dev/null" >> /etc/crontab +echo "" >> /etc/crontab +echo "# Sync ActualBudget Residence through RentCast on the 1st & 15th day of every month at 4 AM" >> /etc/crontab +echo "#00 4 1 * * root cd /opt/actual-helpers && node rentcast.js > /dev/null" >> /etc/crontab +echo "#00 4 15 * * root cd /opt/actual-helpers && node rentcast.js > /dev/null" >> /etc/crontab +echo "" >> /etc/crontab +echo "# Sync ActualBudget Residence through Zillow on the 1st & 16th day of every month at 5 AM" >> /etc/crontab +echo "30 4 1 * * root cd /opt/actual-helpers && node zestimate.js > /dev/null" >> /etc/crontab +echo "30 4 16 * * root cd /opt/actual-helpers && node zestimate.js > /dev/null" >> /etc/crontab +echo "" >> /etc/crontab +echo "# Output the current budget status to a file" >> /etc/crontab +echo "00 5 * * * root cd /opt/actual-helpers && node budget.js > /root/budget.txt" >> /etc/crontab \ No newline at end of file