latest junk
This commit is contained in:
parent
19acc1bc9f
commit
51c68803c5
10
bin/unlock-syncpi-las2
Executable file
10
bin/unlock-syncpi-las2
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
KEYFILE="$HOME/Documents/sync/secrets/luks/syncpi-las2.luks.txt.gpg"
|
||||||
|
|
||||||
|
if [[ ! -e "$KEYFILE" ]]; then
|
||||||
|
echo "wrong box!" >> /dev/stderr
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
gpg -d "$KEYFILE" | ssh root@syncpi-las2.tor "bash /root/unlock_disks"
|
23
x/main.go
Normal file
23
x/main.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
import "time"
|
||||||
|
import "github.com/bamzi/jobrunner"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
jobrunner.Start() // optional: jobrunner.Start(pool int, concurrent int) (10, 1)
|
||||||
|
jobrunner.Schedule("@every 5s", ReminderEmails{})
|
||||||
|
time.Sleep(time.Second * 30)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Job Specific Functions
|
||||||
|
type ReminderEmails struct {
|
||||||
|
// filtered
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReminderEmails.Run() will get triggered automatically.
|
||||||
|
func (e ReminderEmails) Run() {
|
||||||
|
// Queries the DB
|
||||||
|
// Sends some email
|
||||||
|
fmt.Printf("Every 5 sec send reminder emails \n")
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user