mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2025-02-16 23:34:29 +00:00
Worst implementation --daemon mode for files interact
This commit is contained in:
parent
d29a97b19c
commit
d8e6271d8f
|
@ -979,6 +979,24 @@ custom_manual_api_request()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ "$1" = '--daemon' ]; then
|
||||||
|
echo "Daemon mode started; files listening..."
|
||||||
|
while true; do
|
||||||
|
sleep 5
|
||||||
|
statuses_to_fav=$(/bin/ls $main_basedir/all_statuses/$instance/*/favourite 2>/dev/null)
|
||||||
|
statuses_to_share=$(/bin/ls $main_basedir/all_statuses/$instance/*/share 2>/dev/null)
|
||||||
|
if [ -n "$statuses_to_fav" ]; then
|
||||||
|
status_id=$(dirname "$statuses_to_fav" | sed 's/.*\///g')
|
||||||
|
favorite_api_status $status_id
|
||||||
|
rm $statuses_to_fav
|
||||||
|
fi
|
||||||
|
if [ -n "$statuses_to_share" ]; then
|
||||||
|
status_id=$(dirname "$statuses_to_share" | sed 's/.*\///g')
|
||||||
|
share_api_status $status_id
|
||||||
|
rm $statuses_to_share
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
menu_write_status='Write status'
|
menu_write_status='Write status'
|
||||||
menu_timeline='Timelines'
|
menu_timeline='Timelines'
|
||||||
notif='Notifications'
|
notif='Notifications'
|
||||||
|
|
Loading…
Reference in a new issue