From d0b6d7fc8ec8e8d5ae90401410bb68c827685076 Mon Sep 17 00:00:00 2001 From: Sean Breckenridge Date: Fri, 27 Oct 2023 14:59:57 -0700 Subject: [PATCH] rename approve comments usage --- bin/vps_backup_server | 2 +- functions.sh | 2 +- jobs/linux/guestbook_comments.job | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/vps_backup_server b/bin/vps_backup_server index 936402a..1c7049d 100755 --- a/bin/vps_backup_server +++ b/bin/vps_backup_server @@ -26,6 +26,6 @@ tar xf "$BACKUP_TO" -C "$CACHE_DIR" command -v dust >/dev/null 2>&1 && dust -n 8 "$BACKUP_DIR" set +x -"${THIS_DIR}/approve_comments" --epochs 2>/dev/null | grep '^EPOCH' | cut -d':' -f2 | jq >"${BACKUP_DIR}/page_hits_epochs.json" +"${THIS_DIR}/approve-comments" --epochs 2>/dev/null | grep '^EPOCH' | cut -d':' -f2 | jq >"${BACKUP_DIR}/page_hits_epochs.json" printf "Backed up %d files from the VPS\n" "$(tar tvf "${HOME}/.cache/backup_dir.tar.gz" | wc -l)" diff --git a/functions.sh b/functions.sh index a40a217..1376f00 100644 --- a/functions.sh +++ b/functions.sh @@ -9,7 +9,7 @@ alias remsync-public='REMSYNC_PUBLIC=1 remsync' # to push to /p/ (public index) # to use ranger to quickly remove/add files alias remsync-ranger='ranger "${XDG_DOCUMENTS_DIR}/remsync" && remsync' alias remsync-public-ranger='ranger "${HOME}/Files/remsync_public" && remsync-public' -alias print-new-comments='approve_comments --print-new-comments' +alias print-new-comments='approve-comments --print-new-comments' alias page-hits="curl -s 'https://sean.fish/api/page_hit' | jq '.count'" alias gb-comments="curl 'https://sean.fish/api/gb_comment' | jq 'reverse'" gb-comments-pretty() { diff --git a/jobs/linux/guestbook_comments.job b/jobs/linux/guestbook_comments.job index ebfc92a..2708c4f 100644 --- a/jobs/linux/guestbook_comments.job +++ b/jobs/linux/guestbook_comments.job @@ -8,7 +8,7 @@ evry 15 minutes -guestbook_comments && { get_count() { local SSH_OUTPUT COUNT_LINE - SSH_OUTPUT="$("${REPOS}/vps/bin/approve_comments" --print-count 2>/dev/null)" || return $? + SSH_OUTPUT="$("${REPOS}/vps/bin/approve-comments" --print-count 2>/dev/null)" || return $? COUNT_LINE="$(grep -m1 -P '^COUNT:\d+' <<<"$SSH_OUTPUT")" || { echo "Couldn't find 'COUNT' in ssh output" 1>&2 return 1