#!/bin/bash # SPDX-License-Identifier: Apache-2.0 # Copyright (C) 2020-present Fewtarius . /etc/profile if [ "${UI_SERVICE}" = "weston.service" ] then if [ -f "${*}" ] then RUN=$(echo ${*} | sed 's# #\\ #g') weston-terminal --command="${RUN}" else weston-terminal --command="${*}" fi else systemctl stop ${UI_SERVICE} clear >/dev/console 2>&1 $* >/dev/console 2>/dev/null || "$*" 2>/dev/null clear >/dev/console 2>&1 fi if [ ! "${UI_SERVICE}" = "weston.service" ] then systemctl start ${UI_SERVICE} fi