aboutsummaryrefslogtreecommitdiff
path: root/articles/2026/Living-on-Snac's-bleeding-edge.html
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2026-07-12 11:08:50 +0200
committerPhilip Wittamore <philip@wittamore.com>2026-07-12 11:08:50 +0200
commit420ceb49b53a8fa9d8ba8443e42e50cd7bd7cea9 (patch)
tree3009f0564d75e3f7d1ca38507e7ebb92deaded07 /articles/2026/Living-on-Snac's-bleeding-edge.html
update
Diffstat (limited to 'articles/2026/Living-on-Snac's-bleeding-edge.html')
-rw-r--r--articles/2026/Living-on-Snac's-bleeding-edge.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/articles/2026/Living-on-Snac's-bleeding-edge.html b/articles/2026/Living-on-Snac's-bleeding-edge.html
new file mode 100644
index 0000000..a17ffc6
--- /dev/null
+++ b/articles/2026/Living-on-Snac's-bleeding-edge.html
@@ -0,0 +1,60 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <link rel="stylesheet" href="/style.css" />
+ <link rel="icon" type="image/x-icon" href="/favicon.ico" />
+ <title>Living on Snac's bleeding edge</title>
+ </head>
+ <body>
+ <header>
+ <h1>Bloggings</h1>
+ <a href="/index.php">Back</a>
+ </header>
+ <main>
+ <article>
+ <h2>Living on Snac's bleeding edge</h2>
+ <h3>2026-05-25</h3>
+ <h4>Autoupdate script</h4>
+ <p>
+ I like living on the bleeding edge of
+ <a href="https://codeberg.org/grunfink/snac2">snac2</a>, so I added
+ this (banal) script to /etc/cron.daily.
+ </p>
+ <pre>
+#!/usr/bin/env bash
+# snaceto
+# Social Networks Are Crap Except This One
+
+cd /home/snac/src/snac2 || exit
+
+sudo -u snac git remote update
+UPDATED="$(git status -uno | grep -c 'up to date')"
+
+if [ "$UPDATED" -ne "1" ] ; then
+ echo "Updating..."
+ systemctl stop snac.service
+ # backup data before update
+ TODAY=$(date "+%Y-%m-%d-%H-%m")
+ BACKUPDIR="/opt/backups"
+ mkdir -p "$BACKUPDIR"
+ FILENAME="$BACKUPDIR/pre-update-snac-$TODAY.tar.gz"
+ tar -zcf "$FILENAME" /home/snac/data
+ # pull latest
+ sudo -u snac git pull
+ sudo -u snac make
+ make install
+ sudo -u snac snac upgrade /home/snac/data
+ systemctl start snac.service
+ VERSION="$(snac | head -n2)"
+ toot post "My bleeding edge #snac2 server has been updated<br>$VERSION"
+fi
+</pre>
+ </article>
+ </main>
+ <footer>
+ <p>ยง</p>
+ </footer>
+ </body>
+</html>