~anjan/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] fixed rc-update typo

Details
Message ID
<20240210214028.13325-1-hallo@magdesign.ch>
DKIM signature
permerror
Download raw message
Patch: +4 -3
---
 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
Details
Message ID
<CZ59ZOCW74QY.2FEJJP4HS5NLA@momi.ca>
In-Reply-To
<20240210214028.13325-1-hallo@magdesign.ch> (view parent)
DKIM signature
pass
Download raw message
Thanks!

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

--
w:] www.momi.ca
pgp:] https://momi.ca/publickey.txt
Reply to thread Export thread (mbox)