~anjan/public-inbox

fixed rc-update typo v1 APPLIED

magdesign: 1
 fixed rc-update typo

 1 files changed, 4 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~anjan/public-inbox/patches/49362/mbox | git am -3
Learn more about email & git

[PATCH] fixed rc-update typo Export this patch

---
 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
Thanks!

To git@git.sr.ht:~anjan/sxmo-userscripts
   e06af5d..1c03b72  master -> master

--
w:] www.momi.ca
pgp:] https://momi.ca/publickey.txt