#!/usr/bin/env bash

cd $(dirname $0)
source cron.sh

PATH=/package/host/localhost/php-7.1/bin/:$PATH

dir=$1
action=$2
token=$3

name=$(basename $dir)
name=${name/fediverse.joinout.de}
name=${name/.}

[ "$name" ] && name="-$name"

cd $dir
$CTRSS $(basename $0 .sh)-$action$name php fediadmin.php action=fediverse-$action token=$token