mirror of
https://github.com/femtofox/femtofox.git
synced 2026-10-26 02:49:05 -04:00
Fix "run software" command in software menu, re-enable for Contact and Control
This commit is contained in:
parent
b7bc76a9ac
commit
3997de8c87
5 changed files with 6 additions and 6 deletions
|
|
@ -535,6 +535,7 @@ meshtastic_settings() {
|
|||
dialog --no-collapse --infobox "Loading Meshtastic settings menu...\n\nStopping conflicting services, will restart after exit...\n\nThis can take up to a minute." 9 50
|
||||
femto-utils.sh -A stop
|
||||
python /opt/control/main.py --host
|
||||
echo "Restarting conflicting services..."
|
||||
femto-utils.sh -A start
|
||||
)
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -100,8 +100,8 @@ package_menu() {
|
|||
# for each line, check if it's supported by the package, display it if the current install state of the package is appropriate (example: don't display "install" if the package is already installed, don't display "stop service" for a package with no services)
|
||||
if $package_dir/$1.sh -I; then service_state=$(femto-utils.sh -C "$($package_dir/$1.sh -E)"); fi
|
||||
# Removed from menu list until can be fixed - contact does not launch. When returned to list, should be first entry
|
||||
# $(if $package_dir/$1.sh -O | grep -q 'l' && $package_dir/$1.sh -I; then echo "Run software x"; fi) \
|
||||
menu_list="\
|
||||
$(if $package_dir/$1.sh -O | grep -q 'l' && $package_dir/$1.sh -I; then echo "Run software x"; fi) \
|
||||
$(if $package_dir/$1.sh -O | grep -q 'i' && ! $package_dir/$1.sh -I; then echo "Install x"; fi) \
|
||||
$(if $package_dir/$1.sh -O | grep -q 'u' && $package_dir/$1.sh -I; then echo "Uninstall x"; fi) \
|
||||
$(if $package_dir/$1.sh -O | grep -q 'a' && $package_dir/$1.sh -I; then echo "Initialize x"; fi) \
|
||||
|
|
@ -128,7 +128,7 @@ package_menu() {
|
|||
else
|
||||
# execute the actual commands
|
||||
case $choice in
|
||||
"Run software") echo "Launching $($package_dir/$1.sh -N)..." && eval "$($package_dir/$1.sh -l)" ;;
|
||||
"Run software") eval "$package_dir/$1.sh -l" ;;
|
||||
"Install") install $1 ;;
|
||||
"Uninstall") uninstall $1 ;;
|
||||
"Initialize") initialize $1 ;;
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@
|
|||
# Messages to the user (such as configuration instructions, explanatory error messages, etc) should be given as: `echo "user_message: text"`
|
||||
# Everything following `user_message: ` will be displayed prominently to the user, so it must the last thing echoed
|
||||
|
||||
|
||||
name="Contact" # software name
|
||||
author="pdxlocations" # software author - OPTIONAL
|
||||
description="A Text-Based Console UI for Meshtastic Nodes. Formerly called Curses Client.\nAfter install, run \`contact\` to launch." # software description - OPTIONAL (but strongly recommended!)
|
||||
URL="https://github.com/pdxlocations/contact/" # software URL. Can contain multiple URLs - OPTIONAL
|
||||
options="xiuglNADUOLGTCI" # script options in use by software package. For example, for a package with no service, exclude `edsrS`
|
||||
launch="python /opt/contact/main.py --host" # command to launch software, if applicable
|
||||
launch="echo \"Stopping conflicting services (if any), will restart after exit...\" && sudo femto-utils.sh -A stop && sudo -u ${SUDO_USER:-$(whoami)} env LANG=$LANG TERM=$TERM NCURSES_NO_UTF8_ACS=$NCURSES_NO_UTF8_ACS python /opt/contact/main.py --host && echo \"Restarting conflicting services (if any)...\" && sudo femto-utils.sh -A start" # command to launch software, if applicable
|
||||
service_name="" # the name of the service/s, such as `chrony`. REQUIRED if service options are in use. If multiple services, separate by spaces "service1 service2"
|
||||
location="/opt/contact" # install location REQUIRED if not apt installed. Generally, we use `/opt/software-name`
|
||||
license="$location/LICENSE" # file to cat to display license
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ author="pdxlocations" # software author - OPTIONAL
|
|||
description="Control for Meshtastic is a fully-featured Meshtastic configuration tool made for running in console, utilizing Curses.\n\nControl is installed by default on Femtofox and is used for Meshtastic configuration in femto-config. Uninstallation is not recommended." # software description - OPTIONAL (but strongly recommended!)
|
||||
URL="https://github.com/pdxlocations/control" # software URL. Can contain multiple URLs - OPTIONAL
|
||||
options="hxiuglNADUOLGTIC" # script options in use by software package. For example, for a package with no service, exclude `edsrS`
|
||||
launch="python /opt/control/main.py --host" # command to launch software, if applicable
|
||||
launch="echo \"Stopping conflicting services (if any), will restart after exit...\" && sudo femto-utils.sh -A stop && sudo -u ${SUDO_USER:-$(whoami)} env LANG=$LANG TERM=$TERM NCURSES_NO_UTF8_ACS=$NCURSES_NO_UTF8_ACS python /opt/control/main.py --host && echo \"Restarting conflicting services (if any)...\" && sudo femto-utils.sh -A start" # command to launch software, if applicable
|
||||
license="/opt/control/LICENSE" # file to cat to display license
|
||||
location="/opt/control" # install location REQUIRED if not apt installed. Generally, we use `/opt/software-name`
|
||||
license="$location/LICENSE" # file to cat to display license
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ while getopts ":$options" opt; do
|
|||
;;
|
||||
l) # Option -l (Run software)
|
||||
echo "Launching $name..."
|
||||
sudo -u ${SUDO_USER:-$(whoami)} $launch
|
||||
eval "$launch"
|
||||
;;
|
||||
N) echo -e $name ;;
|
||||
A) echo -e $author ;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue