mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2026-02-06 09:50:03 +00:00
Added dead switch
This commit is contained in:
1
templates/.zshrc
Normal file
1
templates/.zshrc
Normal file
@@ -0,0 +1 @@
|
||||
source /root/powerlevel10k/powerlevel10k.zsh-theme
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /bin/bash
|
||||
#!/bin/bash
|
||||
# This is meant to be run by cron, just setup a cronjob to run this script every day or so
|
||||
# This script checks if a file ($fileSwitch) is last modified > $dayLimit days ago & if so a script is run
|
||||
# On your computer or laptop, setup a cronjob to run an ssh command to modify $fileSwitch every couple hours or so.
|
||||
|
||||
@@ -9,11 +9,11 @@ currDate=$(date '+%Y-%m-%d')
|
||||
git clone git@github.com:CPunch/openpunk.git
|
||||
cp $postTemplate $pageName
|
||||
|
||||
# replace our {{DATE}} with the current date
|
||||
sed -i 's/{{DATE}}/'$currDate'/g' $pageName
|
||||
# replace our --DATE-- with the current date
|
||||
sed -i 's/--DATE--/'$currDate'/g' $pageName
|
||||
|
||||
# commit & push the post
|
||||
cd openpunk
|
||||
git add .
|
||||
git commit -m "DeadSwitch: Posted dead message"
|
||||
git push
|
||||
git commit -m "DeadSwitch: No response from CPunch in 14 days, posting dead.md"
|
||||
git push --force
|
||||
|
||||
Reference in New Issue
Block a user