mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-25 21:21:26 +00:00
Added config for status archiver
This commit is contained in:
parent
a85d67dab5
commit
7c09fb0307
|
@ -1,5 +1,7 @@
|
|||
{
|
||||
"instance": "soc.phreedom.club",
|
||||
"statuses_file_archive": true,
|
||||
"statuses_file_archive_after_time": 86400,
|
||||
"main_proxy": "",
|
||||
"connect_protocol_via_main_proxy": "https",
|
||||
"i2p_http_proxy_addr": "http://127.0.0.1:4444",
|
||||
|
|
|
@ -31,6 +31,7 @@ proxy_init
|
|||
instance_point="$default_connect_protocol://$instance/api/v1"
|
||||
instance_point_pleroma="$default_connect_protocol://$instance/api/pleroma"
|
||||
instance_hist='instance.hist'
|
||||
statuses_file_archive=$(jj -i config.json statuses_file_archive)
|
||||
enabled_nsfw=$(jj -i config.json enabled_nsfw)
|
||||
nsfw_only=$(jj -i config.json nsfw_only)
|
||||
hide_reblogs=$(jj -i config.json hide_reblogs)
|
||||
|
@ -799,7 +800,9 @@ statuses_auto_update()
|
|||
sleep 3
|
||||
done
|
||||
echo "Sleeping..."
|
||||
if [ "$statuses_file_archive" = 'true' ]; then
|
||||
./utils/statuses_archiver.sh
|
||||
fi
|
||||
sleep 30
|
||||
done
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
mkdir -p "$main_basedir/archives/"
|
||||
unixtime_offset=$(expr $(date "+%s") - 86400)
|
||||
statuses_file_archive_after_time=$(jj -i "$main_basedir"/config.json statuses_file_archive_after_time)
|
||||
unixtime_offset=$(expr $(date "+%s") - $statuses_file_archive_after_time)
|
||||
|
||||
for i in "$main_basedir"/all_statuses/$instance/*; do
|
||||
|
||||
|
|
Loading…
Reference in a new issue