init
This commit is contained in:
parent
4f4f56c7f2
commit
058f5aa5b3
3 changed files with 27 additions and 0 deletions
BIN
Peeper
Normal file
BIN
Peeper
Normal file
Binary file not shown.
9
install-cronjob.sh
Normal file
9
install-cronjob.sh
Normal file
|
|
@ -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."
|
||||
18
setup-peepinfo.sh
Normal file
18
setup-peepinfo.sh
Normal file
|
|
@ -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."
|
||||
Loading…
Add table
Add a link
Reference in a new issue