#!/bin/bash

unit=${*: -1:1}
cmd=${*: -2:1}

systemctl $@

if [ -n "$unit" -a -n "$cmd" ]; then
	case $cmd in
		start|stop|reload|restart|try-restart|reload-or-restart|try-reload-or-restart)
			systemctl status $unit
		;;
	esac
fi
