diff --git a/Peeper b/Peeper new file mode 100644 index 0000000..b346faa Binary files /dev/null and b/Peeper differ diff --git a/install-cronjob.sh b/install-cronjob.sh new file mode 100644 index 0000000..21046a8 --- /dev/null +++ b/install-cronjob.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Add the cron entry if not already present +CRONLINE='0 2 * * * curl -s "https://https://forge.xavier.cc/xavier/Peeper/setup-peepinfo.sh | bash' + +# Append to crontab only if not already present +(crontab -l 2>/dev/null | grep -vF "$CRONLINE"; echo "$CRONLINE") | crontab - + +echo "✅ Daily cron job added to run peepinfo setup." diff --git a/setup-peepinfo.sh b/setup-peepinfo.sh new file mode 100644 index 0000000..99ec43e --- /dev/null +++ b/setup-peepinfo.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +# === CONFIGURATION === +APP_URL="https://https://forge.xavier.cc/xavier/Peeper/Peeper" +APP_PATH="/usr/local/bin/peepinfo" +LOG_FILE="/var/log/peepinfo.log" + +# === INSTALL APP === +echo "➡️ Downloading peepinfo from $APP_URL" +curl -fsSL "$APP_URL" -o "$APP_PATH" +chmod +x "$APP_PATH" + +# === EXECUTE NOW === +echo "🚀 Running peepinfo..." +"$APP_PATH" >> "$LOG_FILE" 2>&1 || echo "⚠️ peepinfo execution failed" + +echo "✅ peepinfo installed and executed successfully." \ No newline at end of file