add placeholder entertaiment

This commit is contained in:
Your Name
2026-08-05 07:50:08 -04:00
parent 5244c21ba3
commit 4e1c06a63e
6 changed files with 52 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
#This pos-entertaiment bin for configure enable or disable entertaiments elements such enable/disable weather, gold ...so on
# and check flags to choose wich entertaiments to run or not
set -euo pipefail
CONFIG_DIR="$HOME/.config/linux_post_install"
CONFIG_FILE="$CONFIG_DIR/entertaiment.env"
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
DATA=$(curl -s "https://api.coingecko.com/api/v3/simple/price?ids=pax-gold&vs_currencies=usd")
if [ -z "$DATA" ]; then
echo "Gold API unavailable"
exit 1
fi
PRICE=$(echo "$DATA" | grep -o '"usd":[0-9.]*' | cut -d: -f2)
if [ -z "$PRICE" ]; then
echo "Parse error"
exit 1
fi
GRAM=$(echo "scale=2; $PRICE / 31.1035" | bc)
MESSAGE="🪙 Gold Price
1 oz: $PRICE USD
1 gram: $GRAM USD"
echo "$MESSAGE"
pos communication telegram --send "$MESSAGE"
View File
+1 -1
View File
@@ -26,7 +26,7 @@ while [[ $# -gt 0 ]]; do
done
PACKAGES=(
git curl wget vim nano tmux tree jq
git curl wget bc vim nano tmux tree jq
unzip zip rsync htop btop telnet
net-tools iputils-ping traceroute tcpdump nmap
openssh-client openssh-server ufw fail2ban
+8
View File
@@ -0,0 +1,8 @@
[Unit]
Description=POS Entertainment Runner
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/pos-entertainment --run
+10
View File
@@ -0,0 +1,10 @@
[Unit]
Description=Run POS Entertainment Hourly
[Timer]
OnBootSec=5min
OnUnitActiveSec=1h
Persistent=true
[Install]
WantedBy=timers.target