Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3250

General Questions • [Software] Bash Scripit Advise

$
0
0
Hi Everyone,

I have the following Bash scrpit that starts up when my Debain 12 PoS machine boots and it works great I just wondered if I could make it look a
little more cleaner.

Code:

##!/bin/bashecho 'Starting Epson TM88 PoS Printer Module'sudo chmod +x /algPoS/Apps/EpsonPrinter/EpsonModule.gambas/algPoS/Apps/EpsonPrinter/EpsonModule.gambas > /dev/null 2>&1 & sleep 5echo 'Starting Epson Status Module'sudo chmod +x /algPoS/Apps/StatusModule/EpsonStatus.gambas/algPoS/Apps/StatusModule/EpsonStatus.gambas > /dev/null 2>&1 & sleep 5echo 'Starting Toshiba LIUST-51 Line Display Controler Module'sudo chmod +x /algPoS/Apps/LIUST/LIUST.gambas/algPoS/Apps/LIUST/LIUST.gambas > /dev/null 2>&1 & sleep 5echo 'Syncing PoS Database With System Database Please wait...'sudo chmod +x /algPoS/Apps/DataSync/DatabaseSync.gambas/algPoS/Apps/DataSync/DatabaseSync.gambas /bootup> /dev/null 2>&1 sleep 5echo 'Starting Database Sync program in real Time'sudo chmod +x /algPoS/Apps/DataSync/DatabaseSync.gambas/algPoS/Apps/DataSync/DatabaseSync.gambas /rts > /dev/null 2>&1 & sleep 5echo 'Starting PoS Data file Processing Module'sudo chmod +x /algPoS/Apps/DataSync/DatabaseSync.gambas/algPoS/Apps/DataProcessor/DataProcessor.gambas > /dev/null 2>&1 & sleep 5echo 'Starting BasicRetail Point of sale Software'sudo chmod +x /algPoS/Apps/RetailPoS/RetailPoS.gambas/algPoS/Apps/RetailPoS/RetailPoS.gambas /fullscreen /nomouse > /dev/null 2>&1  sleep 4until BasicRetail; do  echo "BasicRetail has Crashed with exit code $?. Restarting.." ? &2  /algPoS/Apps/RetailPoS/RetailPoS.gambas /fullscreen /nomouse > /dev/null 2>&1   sleep 1done
Example of what I would like

when I have echo 'Starting Epson TM88 PoS Printer Module' I would like the System to load the app and them once it has loaded show

Starting Epson TM88 PoS Printer Module DONE

and have the DONE align up for each echo I have so when it gets the last line i should see on screen

Code:

Starting Epson TM88 PoS Printer Module                                 DONEStarting Epson Status Module                                           DONEStarting Toshiba LIUST-51 Line Display Controller Module               DONESyncing PoS Database With System Database Please wait...               DONEStarting Database Sync program in real Time                            DONEStarting PoS Data file Processing Module                               DONEStarting BasicRetail Point of sale Software
Can this be done or do I need to rethink the starting of my PoS Box?

Thanks in advance of any help / code any one would give


Andy

Statistics: Posted by gablea — 2024-05-18 21:05 — Replies 5 — Views 80



Viewing all articles
Browse latest Browse all 3250

Trending Articles