#!/bin/sh mastodon-image-uploader-bot >./tmp/log.out 2>./tmp/log.err if [ ! -s ./tmp/log.err ]; then echo -n "$(date +"[%Y-%M-%d %T]") success: " >> ./bot.log cat ./tmp/log.out >> ./bot.log else echo -n "$(date +"[%Y-%M-%d %T]") errors: " >> ./bot.log cat ./tmp/log.err >> ./bot.log fi