From c835954f5d22dcc99d1eff3d1630444eb85639ac Mon Sep 17 00:00:00 2001 From: Daniel <2+daniel@noreply.localhost> Date: Thu, 15 Oct 2026 05:11:36 +0000 Subject: [PATCH] Update mastodon.sh adding required lines for running the script as a cronjob --- mastodon.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mastodon.sh b/mastodon.sh index 5ec2c7f..f7ccab1 100644 --- a/mastodon.sh +++ b/mastodon.sh @@ -1,11 +1,20 @@ #!/bin/bash #written by Daniel Wenzlik 2024 - https://danielwenzlik.com +#modified by Daniel Wenzlik 2026 - https://danielwenzlik.com #Script under the GNU AGPLv3 license. +# making rbenv/Ruby accessible for the user/script +export HOME="/home/mastodon" +export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:/usr/local/bin:/usr/bin:/bin" + +# initialise rbenv +eval "$("$HOME/.rbenv/bin/rbenv" init - bash)" + #using the correct directory echo "Navigating to the Mastodon Directory now"; cd /home/mastodon/live/; +export RAILS_ENV=production #deleting cache files echo "Clearing cache";