From dc271d65ab94bcc7c62197f1074f2beb44efadf9 Mon Sep 17 00:00:00 2001 From: Charles Benca Date: Wed, 8 Nov 2023 22:57:03 -0500 Subject: [PATCH] small quality of life refactoring --- index.php | 96 +++++++++++++++++++++------------ tail-errors.sh | 7 +++ ubuntu-apache2-deploy-linked.sh | 24 +++++++++ 3 files changed, 92 insertions(+), 35 deletions(-) create mode 100644 tail-errors.sh create mode 100644 ubuntu-apache2-deploy-linked.sh diff --git a/index.php b/index.php index f14d113..c42347e 100644 --- a/index.php +++ b/index.php @@ -152,42 +152,68 @@ - -
-

ABOUT

- -
- text(fread($filename,filesize($file))); - fclose($filename); - ?> -
-
- - - -
-

DOCUMENTATION

- -
- text(fread($filename,filesize($file))); - fclose($filename); - ?> -
-
- + +
+

+ +
+ text(fread($filename,filesize($file))); + fclose($filename); + ?> +
+
+ "./markdown/about.md", + "title" => "ABOUT" + ], + [ + "path" => "./markdown/main.md", + "title" => "DOCUMENTATION" + ], + [ + "path" => "./markdown/cccp.md", + "title" => "CCCP" + ], + [ + "path" => "./markdown/installer.md", + "title" => "INSTALLER" + ], + [ + "path" => "./markdown/liveusb.md", + "title" => "LIVE USB" + ], + [ + "path" => "./markdown/repo.md", + "title" => "REPO" + ] +]; + + + +foreach ($mdFiles as $mdFile) { + printMdFile($mdFile["path"], $mdFile["title"]); +} + + + ?> diff --git a/tail-errors.sh b/tail-errors.sh new file mode 100644 index 0000000..26381c3 --- /dev/null +++ b/tail-errors.sh @@ -0,0 +1,7 @@ +#!/bin/bash + + +tail /var/log/apache2/error.log; + + + diff --git a/ubuntu-apache2-deploy-linked.sh b/ubuntu-apache2-deploy-linked.sh new file mode 100644 index 0000000..f54493d --- /dev/null +++ b/ubuntu-apache2-deploy-linked.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +whoiam="$(whoami)"; + + +dest="/var/www/linkedhtml"; + +# https://stackoverflow.com/questions/59895/how-do-i-get-the-directory-where-a-bash-script-is-located-from-within-the-script +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ); + +#rm -rf ${dest}/*; +#shopt -s dotglob; +#cp -r * "${dest}/"; + + +sudo -s -- <