diff --git a/environment-setup/femtofox.chroot b/environment-setup/femtofox.chroot index 6e7676a..1d86242 100644 --- a/environment-setup/femtofox.chroot +++ b/environment-setup/femtofox.chroot @@ -38,7 +38,7 @@ pip3 install requests pyephem pytap2 meshtastic pypubsub geopy maidenhead beauti if [[ $? -eq 2 ]]; then echo "Error, step failed..."; fi echo "Adding Samba configuration..." # add it manually so we're always using the most up to date smb.conf file template from the package -echo -e "\n[home]\npath = /home/femto\nbrowsable = yes\nwritable = yes\nread only = no\ncreate mask = 0775\ndirectory mask = 0775\nvalid users = femto" | sudo tee -a /etc/samba/smb.conf > /dev/null && sudo systemctl restart smbd +echo "\n[home]\npath = /home/femto\nbrowsable = yes\nwritable = yes\nread only = no\ncreate mask = 0775\ndirectory mask = 0775\nvalid users = femto" | sudo tee -a /etc/samba/smb.conf > /dev/null && sudo systemctl restart smbd echo "Setting MOTD..." mv /etc/update-motd.d/10-help-text /etc/update-motd.d/10-help-text.bak diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh index 30a4da9..bd96cdc 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-software.sh @@ -13,7 +13,7 @@ install() { output=$($package_dir/$1.sh -i) install_status=$? # Capture the exit status of the eval command user_message=$(echo "$output" | awk '/user_message: / {found=1; split($0, arr, "user_message: "); print arr[2]; next} found {print}' | sed '/^$/q') # grab the user_message, if present - #output=$(echo -e "$output" | sed '/user_message: /,$d') # remove the user message from the detailed output + output=$(echo -e "$output" | sed '/user_message: /,$d') # remove the user message from the detailed output if [ $install_status -eq 0 ]; then # if the installation was successful dialog --no-collapse --colors --title "$title" --beep --msgbox "\ZuInstallation of $($package_dir/$1.sh -N) successful!\Zn$([ -n "$user_message" ] && echo "\n\n$user_message")\n\nLog:\n$(echo $output)" 0 0 # if there's a user_message, display it with two preceeding line breaks @@ -23,7 +23,7 @@ install() { } uninstall() { - dialog --no-collapse --title "$title" --yesno "\nUninstall $1\n\nProceed?" 10 40 + dialog --no-collapse --title "$title" --yesno "\nUninstall $($package_dir/$1.sh -N)\n\nProceed?" 10 40 if [ $? -eq 1 ]; then #if cancel/no return 1 fi @@ -31,7 +31,7 @@ uninstall() { output=$(eval "$package_dir/$1.sh -u 2>&1 | tee /dev/tty") install_status=$? # Capture the exit status of the eval command user_message=$(echo "$output" | awk '/user_message: / {found=1; split($0, arr, "user_message: "); print arr[2]; next} found {print}' | sed '/^$/q') # grab the user_message, if present - #output=$(echo "$output" | sed '/user_message: /,$d') # remove the user message from the detailed output + output=$(echo "$output" | sed '/user_message: /,$d') # remove the user message from the detailed output if [ $install_status -eq 0 ]; then # if the installation was successful dialog --no-collapse --colors --title "$title" --beep --msgbox "\n\ZuUninstallation of $($package_dir/$1.sh -N) successful!\Zn$([ -n "$user_message" ] && echo "\n\n$user_message")\n\nLog:\n$(echo -e "$output")" 0 0 # if there's a user_message, display it with two preceeding line breaks else @@ -40,7 +40,7 @@ uninstall() { } upgrade() { - dialog --no-collapse --title "$title" --yesno "\nUpgrade $1\n\nProceed?" 10 40 + dialog --no-collapse --title "$title" --yesno "\nUpgrade $($package_dir/$1.sh -N)\n\nProceed?" 10 40 if [ $? -eq 1 ]; then #if cancel/no return 1 fi @@ -67,7 +67,7 @@ package_intro() { $(if $package_dir/$1.sh -O | grep -q 'A'; then echo -e "by $($package_dir/$1.sh -A)"; fi)\n\ $(if $package_dir/$1.sh -O | grep -q 'D'; then echo "\n$($package_dir/$1.sh -D)"; fi)\n\ \n\ -$(echo "Currently: " && $package_dir/$1.sh -I && echo "\Zuinstalled\Zn" || echo " \Zunot installed\Zn")\n\ +$(echo "Currently: " && $package_dir/$1.sh -I && echo "\Zuinstalled\Zn" || echo "\Zunot installed\Zn")\n\ $(if output=$($package_dir/$1.sh -L); [ -n "$output" ]; then echo "Installs to: \Zu$output\Zn\n"; fi)\ $(if output=$($package_dir/$1.sh -C); [ -n "$output" ]; then echo "Conflicts with: \Zu$output\Zn\n"; fi)\ An internet connection is required for installation.\n\ @@ -105,11 +105,11 @@ package_menu() { "Install") install $1 ;; "Uninstall") uninstall $1 ;; "Upgrade") upgrade $1 ;; - "Enable service") eval "$package_dir/$1.sh -e" ;; - "Disable service") eval "$package_dir/$1.sh -d" ;; - "Stop service") eval "$package_dir/$1.sh -s" ;; - "Start/restart service") eval "$package_dir/$1.sh -r" ;; - "Get service status") dialog --no-collapse --title "$title" --msgbox "$(eval "$package_dir/$1.sh -S")" 0 0 ;; + "Enable service") echo "Enabling service..." && eval "$package_dir/$1.sh -e" ;; + "Disable service") echo "Disabling service..." && eval "$package_dir/$1.sh -d" ;; + "Stop service") echo "Stopping service..." && eval "$package_dir/$1.sh -s" ;; + "Start/restart service") echo "Starting/restarting service..." && eval "$package_dir/$1.sh -r" ;; + "Get service status") echo "Getting service status..." && dialog --no-collapse --title "$title" --msgbox "$(eval "$package_dir/$1.sh -S")" 0 0 ;; "Back to software manager") break ;; esac done diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/contact_client.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/contact_client.sh index 082f891..00a3bc9 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/contact_client.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/contact_client.sh @@ -85,7 +85,9 @@ $launch" | sudo tee /usr/local/bin/contact > /dev/null # uninstall script uninstall() { rm -rf $location + echo "Removed \`$location\`." rm /usr/local/bin/contact + echo "Removed \`contact\` shortcut." echo "user_message: All files removed." exit 0 # should be `exit 1` if the installation failed } diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/tc2_bbs.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/tc2_bbs.sh index 74e9244..f9f906c 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/tc2_bbs.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/packages/tc2_bbs.sh @@ -93,7 +93,9 @@ uninstall() { systemctl stop $service_name rm /etc/systemd/system/$service_name.service systemctl daemon-reload + echo "Disabled and removed \`$service_name\` service." rm -rf $location + echo "Removed \`$location\`." echo "user_message: Service removed, all files deleted." exit 0 }