|
read -p "Start waydroid service in a separate terminal and once running, come back here and press return" |
This line asks the user to start the Waydroid service in another Terminal
We could instead first check if the system is running under systemd:
if [ "$(readlink /sbin/init)" == "/lib/systemd/systemd" ]; then
systemctl restart waydroid-container -q
else
read -p "Start waydroid service in a separate terminal and once running, come back here and press return"
sleep 20s
fi
# script would continue from here...
if systemd is not available, we could try running x-terminal-emulator if it's available, and ask the user to open one manually only if none is available like this:
if [ "$(readlink /sbin/init)" == "/lib/systemd/systemd" ]; then
systemctl restart waydroid-container -q
else
if [ "$(which x-terminal-emulator)" == "/usr/bin/x-terminal-emulator" ]; then
x-terminal-emulator -e waydroid container start
else
read -p "Start waydroid service in a separate terminal and once running, come back here and press return"
sleep 20s
fi
fi
# script would continue from here...
Knowing myself, there's going to be issues with this approach (or my code lol), but hey, we learn from mistakes 😉
wd-scripts/add-smart-dock.sh
Line 108 in ece5df9
This line asks the user to start the Waydroid service in another Terminal
We could instead first check if the system is running under systemd:
if systemd is not available, we could try running
x-terminal-emulatorif it's available, and ask the user to open one manually only if none is available like this:Knowing myself, there's going to be issues with this approach (or my code lol), but hey, we learn from mistakes 😉