echo "Enter the username for the service that you want to $1." read user echo "Enter the service name that will perform the above action." read service sudo -u ${user} XDG_RUNTIME_DIR="/run/user/$(id -u ${user})" systemctl --user $1 ${service}