Adding some new scripts to be used as examples and based of new Admin Front End Example

This commit is contained in:
Patrick Kloepfer 2019-02-26 15:48:30 -05:00
parent b9aacd89f5
commit c568890386
21 changed files with 277 additions and 6 deletions

Binary file not shown.

Binary file not shown.

10
ADMIN/ADMIN Normal file
View File

@ -0,0 +1,10 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
#
#
CD /MAKE/USR/SHARE/ADMIN
MAN
TEXT ROOT/ADMIN

69
ADMIN/ADMINMENU Normal file
View File

@ -0,0 +1,69 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This menu will display a menu of options
# for the Administration of your A2osX system.
#
ECHO "\f A2osX Admin System Menu\n"
ECHO " 1) Display Processes (PS)"
ECHO " 2) Display Memory (MEM)"
ECHO " 3) Configure Networking (CONFNET)"
ECHO " 4) Kernel Configuration (KCONFIG)"
ECHO " 5) List Volumes Online (ONLINE)"
ECHO " 6) "
ECHO " 7) "
ECHO " 8) "
ECHO " 9) A2osX Test Suite"
ECHO "\n 0) Exit"
ECHO "\n"
READ -P "Enter Choice: " Z
IF [ $Z = "1" ]
echo "\f A2osx Process Listing\n"
PS
ECHO "\nPress Return to redisplay menu"
PAUSE
ELSE
IF [ $Z = "2" ]
echo "\f A2osx Memory Listing\n"
PS
ECHO "\nPress Return to redisplay menu"
PAUSE
ELSE
IF [ $Z = "3" ]
CONFNET
ELSE
IF [ $Z = "4" ]
KCONFIG
ELSE
IF [ $Z = "5" ]
echo "\f Online Volume Listing\n"
LS -L /
ECHO "\nPress Return to redisplay menu"
PAUSE
ELSE
IF [ $Z = "6" ]
ELSE
IF [ $Z = "7" ]
ELSE
IF [ $Z = "8" ]
ELSE
IF [ $Z = "9" ]
PUSHD
CD ../TESTS
TESTMENU
POPD
ELSE
ECHO "\n\nInvalid Selection\n"
FI
FI
FI
FI
FI
FI
FI
FI
FI
MAN
TEXT /MAKE/USR/SHARE/ADMIN/ADMINMENU

13
ADMIN/CONFHOSTNAME Normal file
View File

@ -0,0 +1,13 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This admin script helps the system administrator install
# and configure the network drivers and libraries for A2osX.
#
echo "\f A2osX Network Configuration Utility\n"
echo "Do some net config stuff here"
ECHO "\n"
MAN
TEXT /MAKE/USR/SHARE/ADMIN/CONFNET

13
ADMIN/CONFHOSTS Normal file
View File

@ -0,0 +1,13 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This admin script helps the system administrator install
# and configure the network drivers and libraries for A2osX.
#
echo "\f A2osX Network Configuration Utility\n"
echo "Do some net config stuff here"
ECHO "\n"
MAN
TEXT /MAKE/USR/SHARE/ADMIN/CONFNET

13
ADMIN/CONFIP Normal file
View File

@ -0,0 +1,13 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This admin script helps the system administrator install
# and configure the network drivers and libraries for A2osX.
#
echo "\f A2osX Network Configuration Utility\n"
echo "Do some net config stuff here"
ECHO "\n"
MAN
TEXT /MAKE/USR/SHARE/ADMIN/CONFNET

13
ADMIN/CONFNET Normal file
View File

@ -0,0 +1,13 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This admin script helps the system administrator install
# and configure the network drivers and libraries for A2osX.
#
echo "\f A2osX Network Configuration Utility\n"
echo "Do some net config stuff here"
ECHO "\n"
MAN
TEXT /MAKE/USR/SHARE/ADMIN/CONFNET

13
ADMIN/CONFNETDRV Normal file
View File

@ -0,0 +1,13 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This admin script helps the system administrator install
# and configure the network drivers and libraries for A2osX.
#
echo "\f A2osX Network Configuration Utility\n"
echo "Do some net config stuff here"
ECHO "\n"
MAN
TEXT /MAKE/USR/SHARE/ADMIN/CONFNET

13
ADMIN/ONLINE Normal file
View File

@ -0,0 +1,13 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This admin script lists all the volumes currently mounted,
# their total and used space.
#
echo "\f Online Volume Listing\n"
LS -L /
ECHO "\n"
MAN
TEXT /MAKE/USR/SHARE/ADMIN/ONLINE

12
EXAMPLES/CLEARSCREEN Normal file
View File

@ -0,0 +1,12 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This is script clears the screen.
#
# You may want to rename it CLS.
#
echo -N \f
MAN
TEXT /MAKE/USR/SHARE/EXAMPLES/CLEARSCREEN

15
EXAMPLES/CPOS Normal file
View File

@ -0,0 +1,15 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This is the Cursor Positioning Shell Script
# It takes two parameters, Vertital and Horizontal Position
#
ECHO -N "\e["
ECHO -N $1
ECHO -N ";"
ECHO -N $2
ECHO -N "H"
MAN
TEXT /MAKE/USR/SHARE/EXAMPLES/CPOS

1
EXAMPLES/IFTTT.KEY Normal file
View File

@ -0,0 +1 @@
i1Gka-oOsIGIfmZ9hTNb68LM5lrmVPdQ2kBwNztk2D9

39
EXAMPLES/TWEET Normal file
View File

@ -0,0 +1,39 @@
#!/bin/shell
#
# This is a script to build and send a tweet using A2osx httpget facility.
#
# Copyright 2018. A2osx. All righs reserved. Released under GNU GPL 2.0
# license. See LICENSE file for more informaion.
#
# Writted by Patrick Kloepfer. 12-06-2018
#
echo "\f\n A2osX Tweeter
IF [ $# -GT 0 ]
ECHO "\n\n Tweeter is a interactive program and takes
ECHO " no command line arguments. \n
EXIT
FI
set kf = "IFTTT.KEY"
IF [ -f $kf ]
else
echo "\n\n KEY file not found. Cannot continue.\n
exit
FI
#set tmp = ${ROOT}tmp/
IF [ -d ${ROOT}tmp/ ]
ELSE
echo "\n\n ${ROOT}tmp/ directory not found. Cannot continue.\n
exit
FI
set fn = ${ROOT}tmp/tweet
cat TT > ${fn}
echo -N "httpget maker.ifttt.com -U trigger/tweet/with/key/" >> ${fn}
cat ${kf} >> ${fn}
echo -N "?value1=" >> ${fn}
echo "\n\n Enter tweet on multiple lines, they will be sent as 1 tweet.
echo "\n Press return on a blank line to send Tweet.
echo -N "\n Tweet: "
READ Line1
echo -N "${Line1}\%20" >> ${fn}
ECHO "Sent\%20via\%20A2osX" >> ${fn}
$fn

1
EXAMPLES/TWITURL Normal file
View File

@ -0,0 +1 @@
trigger/tweet/with/key/i1Gka-oOsIGIfmZ9hTNb68LM5lrmVPdQ2kBwNztk2D9?value1=TweetFromA2OSXTodayIsAGreatDayForScripting

22
MAKE/MAKELOGO Normal file
View File

@ -0,0 +1,22 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# Create Logo File
#
ECHO > A2OSXLOGO
ECHO " A " >> A2OSXLOGO
ECHO " AAA " >> A2OSXLOGO
ECHO " AA AA " >> A2OSXLOGO
ECHO " AA AA 222222 SSSSSS Xx xX" >> A2OSXLOGO
ECHO " AA AA 22 OOOOOOOO SS Xx xX" >> A2OSXLOGO
ECHO " AAAAAAAAAAA 22 OooooooO SS XxxX" >> A2OSXLOGO
ECHO " AA AA 222222 Oo oO SSSSSS XX" >> A2OSXLOGO
ECHO " AA AA 22 Oo oO SS XxxX" >> A2OSXLOGO
ECHO " AA AA 22 OooooooO SS Xx xX" >> A2OSXLOGO
ECHO " AA AA 2222222 OOOOOOOO SSSSSS Xx xX" >> A2OSXLOGO
ECHO "" >> A2OSXLOGO
MAN
TEXT /MAKE/USR/SHARE/MAKE/MAKELOGO

View File

@ -10,7 +10,7 @@ AUTO 4,1
# First Clear the Screen
echo -N \f
#
echo "\n\n Build Test Script\n\n
echo "\n\n Build Test Script\n\n"
#
# Now get the build Number
#

16
TESTS/CMDVARTEST Normal file
View File

@ -0,0 +1,16 @@
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This script tests to see if we can build a command line in
# a string and then execute it.
#
SET CMD = "PS"
$CMD
SET CMD = "LS"
SET ARG1 = "-L"
SET ARG2 = "C*"
$CMD $ARG1 $ARG2
MAN
TEXT /MAKE/USR/SHARE/TESTS/CMDVARTEST

View File

@ -1,5 +1,11 @@
#!/BIN/SHELL
Echo \fBegin DNS Tests
NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
#
#
Echo "\fBegin DNS Tests"
Echo Current DNS Table
DNSINFO
ECHO Adding BRTS
@ -7,3 +13,5 @@ DNSINFO BRTS 10.0.0.67
Echo New DNS Table
DNSINFO
Echo End DNS Test
MAN
TEXT /MAKE/USR/SHARE/TESTS/DNSTEST

View File

@ -5,7 +5,7 @@ AUTO 4,1
#SET -X
ECHO "\n\nThis is the ENV Test"
ECHO "\n This will stress the ENV space and string handling"
ECHO "\n\nEnter the size of the base string to use.
ECHO "\n\nEnter the size of the base string to use."
ECHO "Acceptable values are 20, 40, 60, 80 and 100\n"
read -P "String size: " Z
IF [ $Z = "20" ]

View File

@ -5,8 +5,8 @@ AUTO 4,1
#
#
#
ECHO "\f If Numeric Tests
ECHO "\nThis Performs Several Numeric Comparison Tests
ECHO "\f If Numeric Tests"
ECHO "\nThis Performs Several Numeric Comparison Tests"
ECHO -N "\n Test 1: 99 = 99 "
IF [ 99 -eq 99 ]
echo True Pass