2022-09-14 21:35:38 +00:00
|
|
|
#!/bin/bash
|
2022-10-08 23:38:08 +00:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Copyright (C) 2020-present Fewtarius
|
|
|
|
|
2022-09-14 21:35:38 +00:00
|
|
|
. /etc/profile
|
|
|
|
|
2022-10-08 23:38:08 +00:00
|
|
|
RUN=$(echo ${1} | sed 's# #\\ #g')
|
|
|
|
|
2022-09-14 21:35:38 +00:00
|
|
|
if [ "${UI_SERVICE}" = "weston.service" ]
|
|
|
|
then
|
2022-10-08 23:38:08 +00:00
|
|
|
weston-terminal --command="${RUN}"
|
2022-09-14 21:35:38 +00:00
|
|
|
else
|
|
|
|
systemctl stop ${UI_SERVICE}
|
2022-09-21 21:41:31 +00:00
|
|
|
clear
|
2022-10-08 23:38:08 +00:00
|
|
|
${RUN} >/dev/console 2>&1
|
2022-09-21 21:41:31 +00:00
|
|
|
clear
|
2022-09-14 21:35:38 +00:00
|
|
|
fi
|
|
|
|
if [ ! "${UI_SERVICE}" = "weston.service" ]
|
|
|
|
then
|
|
|
|
systemctl start ${UI_SERVICE}
|
|
|
|
fi
|