Skip to content

Instantly share code, notes, and snippets.

View EduardoSantanaSeverino's full-sized avatar

Eduardo Santana Severino EduardoSantanaSeverino

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
#!/bin/bash
# This script will be run by crontab every one mint
# */1 * * * * /root/scripts/turn-on-pve1-cron/turn-on-pve1-cron.sh 2>&1
# This script will power on a remote server via Wake On Lan, but only 5 mints before the backup job is about to be executed.
# This will be reading the job file /etc/pve/jobs.cfg every time:
# On a CRON JOB every 1 mint
# check if the server is not Power On by checking the file, then
# SSH into the pve_node