---
scripts/ssh_toggle.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/ssh_toggle.sh b/scripts/ssh_toggle.sh
index 173b215..debd0f7 100644
--- a/scripts/ssh_toggle.sh
+++ b/scripts/ssh_toggle.sh
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# title="$icon_tof SSH enable"
# Description: Toggles ssh on or off
# Author: magdesign
# License: MIT
+# Note: v0.1 Needs a fix with symbol change state!
# shellcheck source=scripts/core/sxmo_common.sh
. "/usr/bin/sxmo_common.sh"
@@ -14,7 +15,7 @@ path_of_script=~/.config/sxmo/userscripts/ssh_toggle.sh
if [[ $service_status == *"started"* ]]; then
echo "Service sshd is started. Stopping now..."
# asking for privileges and disabling ssh
- sxmo_terminal.sh -t "Enter password" -- sh -c 'sudo rc-service sshd stop' 'sudo rc-update del sshd'
+ sxmo_terminal.sh -t "Enter password" -- sh -c 'sudo rc-service sshd stop && sudo rc-update del sshd'
# notify that service is stopping
notify-send "SSH stopped"
# change the toggle symbol and name of this script
@@ -23,7 +24,7 @@ if [[ $service_status == *"started"* ]]; then
elif [[ $service_status == *"stopped"* ]]; then
echo "Service sshd is stopped. Starting now..."
# asking for privileges and enabling ssh
- sxmo_terminal.sh -t "Enter password" -- sh -c 'sudo rc-service sshd start' 'sudo rc-update add sshd'
+ sxmo_terminal.sh -t "Enter password" -- sh -c 'sudo rc-service sshd start && sudo rc-update add sshd'
# notify that it is starting
notify-send "SSH started"
# change the toggle symbol and name of this script
--
2.43.0