distribution/packages/jelos/sources/scripts/run
2022-11-06 13:18:29 -05:00

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