distribution/packages/jelos/sources/scripts/run

26 lines
520 B
Text
Raw Normal View History

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2020-present Fewtarius
. /etc/profile
if [ "${UI_SERVICE}" = "weston.service" ]
then
2022-11-03 01:43:14 +00:00
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
2022-11-06 18:18:29 +00:00
$* >/dev/console 2>&1 || "$*" 2>&1
clear >/dev/console 2>&1
fi
if [ ! "${UI_SERVICE}" = "weston.service" ]
then
systemctl start ${UI_SERVICE}
fi