diff options
| author | nic <ra@afu.re> | 2024-05-11 22:41:54 -0400 |
|---|---|---|
| committer | nic <ra@afu.re> | 2024-05-11 22:41:54 -0400 |
| commit | 41111989d02a6ad1e66b37dc58a21dd761d8f573 (patch) | |
| tree | 353697dd6a7e5d63c1fa48cf722881649a47cd26 /.local | |
| parent | a2715adbab22946bd168d07c5264e1b8b4c9288f (diff) | |
now using sudo
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/ib-tws | 12 | ||||
| -rwxr-xr-x | .local/bin/mounter | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/.local/bin/ib-tws b/.local/bin/ib-tws index 22fc22b..d8dbb01 100755 --- a/.local/bin/ib-tws +++ b/.local/bin/ib-tws @@ -1,14 +1,14 @@ -#!/bin/bash +#!/bin/sh V=1025 -#TWSUSERID= -#TWSPASSWORD=$(pass) -IBC_INI=$HOME/.local/src/Jts/ibc/config.ini -IBC_PATH=$HOME/.local/src/Jts/ibc TWS_PATH=$HOME/.local/src/Jts TWS_SETTINGS_PATH= +#TWS_USER= +#TWS_PASS=$(pass) +IBC_INI=$HOME/.local/src/Jts/ibc/config.ini +IBC_PATH=$HOME/.local/src/Jts/ibc _2FA=exit # or ... ? LOG_PATH= JAVA_PATH= -$HOME/.local/src/Jts/ibc/scripts/ibcstart.sh $V --tws-path=$TWS_PATH --tws-settings-path= --ibc-path=$IBC_PATH --ibc-ini=$IBC_INI --user= --pw= --fix-user= --fix-pw= --java-path= --mode= --on2fatimeout=$_2FA +exec $HOME/.local/src/Jts/ibc/scripts/ibcstart.sh $V --tws-path=$TWS_PATH --tws-settings-path= --ibc-path=$IBC_PATH --ibc-ini=$IBC_INI --user= --pw= --fix-user= --fix-pw= --java-path= --mode= --on2fatimeout=$_2FA diff --git a/.local/bin/mounter b/.local/bin/mounter index 246680e..3972784 100755 --- a/.local/bin/mounter +++ b/.local/bin/mounter @@ -68,13 +68,13 @@ getmount(){ test -n "$mp" if [ ! -d "$mp" ]; then mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") - [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || doas mkdir -p "$mp") + [ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp") fi } attemptmount(){ # Attempt to mount without a mountpoint, to see if drive is in fstab. - doas mount "$chosen" || return 1 + sudo -A mount "$chosen" || return 1 notify-send "💾Drive Mounted." "$chosen mounted." exit } @@ -84,7 +84,7 @@ case "$chosen" in chosen="${chosen%% *}" chosen="${chosen:1}" # This is a bashism. attemptmount || getmount - doas mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)" + sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)" notify-send "💾Drive Mounted." "$chosen mounted to $mp." ;; @@ -98,12 +98,12 @@ case "$chosen" in done # Decrypt in a terminal window - ${TERMINAL:-st} -n floatterm -g 60x1 -e doas cryptsetup open "$chosen" "usb$num" + ${TERMINAL:-st} -n floatterm -g 60x1 -e sudo cryptsetup open "$chosen" "usb$num" # Check if now decrypted. test -b "/dev/mapper/usb$num" attemptmount || getmount - doas mount "/dev/mapper/usb$num" "$mp" -o uid="$(id -u)",gid="$(id -g)" + sudo -A mount "/dev/mapper/usb$num" "$mp" -o uid="$(id -u)",gid="$(id -g)" notify-send "🔓Decrypted drive Mounted." "$chosen decrypted and mounted to $mp." ;; @@ -112,7 +112,7 @@ case "$chosen" in getmount number="${chosen%%:*}" number="${chosen:1}" # This is a bashism. - doas simple-mtpfs -o allow_other -o fsname="simple-mtpfs-$(escape "$chosen")" --device "$number" "$mp" + sudo -A simple-mtpfs -o allow_other -o fsname="simple-mtpfs-$(escape "$chosen")" --device "$number" "$mp" notify-send "🤖 Android Mounted." "Android device mounted to $mp." ;; esac |
