25 lines
555 B
Bash
Executable file
25 lines
555 B
Bash
Executable file
#!/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>&1 || clear >/dev/console ;"$*" >/dev/console 2>&1
|
|
clear >/dev/console 2>&1
|
|
fi
|
|
if [ ! "${UI_SERVICE}" = "weston.service" ]
|
|
then
|
|
systemctl start ${UI_SERVICE}
|
|
fi
|