social-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is there a server maintenance script?


From: aab
Subject: Re: is there a server maintenance script?
Date: Sun, 29 Jan 2023 19:22:23 +0100

Hi!

There are tons of scripts under:

- /scripts
- /plugins/OStatus/scripts
- /plugins/ActivityPub/scripts

depending on what you want to accomplish. 

I'm not aware of any script to clean old messages (besides deleting
from the database directly, which I don't advice), but I've been
gathering, with the help of the developers, some of them to remove
dead servers. Let's hope it is useful to you:

cd /var/www/gnusocial/scripts/ && mysql -u gnusocial -pPASSWORD
gnusocial -ss -e "SELECT id FROM profile WHERE profileurl LIKE
'%SERVER_URL%';" | while read -r id; do php deleteprofile.php
-y --id "$id"; done

Besides that, I run daily "gs_clean", that is just a single file to
contain (kind of) a maintenance routine. It contains this:

sudo -u www-data php
/var/www/gnusocial/plugins/OStatus/scripts/fixup-shadow.php && sudo -u
www-data php
/var/www/gnusocial/plugins/OStatus/scripts/rm_bad_feedsubs.php && sudo
-u www-data php /var/www/gnusocial/plugins/OStatus/scripts/gcfeeds.php
&& sudo -u www-data php
/var/www/gnusocial/modules/TheFreeNetwork/scripts/fix_duplicates.php
sudo -u www-data php /var/www/gnusocial/scripts/clean_profiles.php -y
&& sudo -u www-data php /var/www/gnusocial/scripts/clean_file_table.php
-y && sudo -u www-data php
/var/www/gnusocial/scripts/delete_orphan_files.php -y && sudo -u
www-data php /var/www/gnusocial/scripts/fixup_deletions.php && sudo -u
www-data php /var/www/gnusocial/scripts/updateuris.php && sudo -u
www-data php /var/www/gnusocial/scripts/updateurls.php


El Sun, 29 Jan 2023 19:04:51 +0100
Gijs Hillenius <gijs@hillenius.net> escribió:
> Hi!
> 
> Do Gnusocial site maintainers need to run housekeeping scripts? Or is
> this all included? Things like, clean out old messages, clear caches,
> remove stale things...
> 
> Thanks for pointers
> 

Attachment: pgpKpL2UUrT0e.pgp
Description: Firma digital OpenPGP


reply via email to

[Prev in Thread] Current Thread [Next in Thread]