From 6711dab4dc94a908d952b926fb53f57828966c33 Mon Sep 17 00:00:00 2001 From: lw-everestlinux Date: Tue, 11 Oct 2022 12:12:23 -0400 Subject: [PATCH] esv v1.0.0 --- src/esv/INSTALL.sh | 31 +++++++++++++++++++++++++++++++ src/esv/README | 22 ++++++++++++++++++++++ src/esv/install.conf.def | 11 +++++++++++ 3 files changed, 64 insertions(+) create mode 100755 src/esv/INSTALL.sh create mode 100755 src/esv/README create mode 100755 src/esv/install.conf.def diff --git a/src/esv/INSTALL.sh b/src/esv/INSTALL.sh new file mode 100755 index 0000000..099b111 --- /dev/null +++ b/src/esv/INSTALL.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +if [[ $(/usr/bin/id -u) -ne 0 ]]; then + printf "must be run as root\n" + exit 1 +fi + +WORKING_DIR=$(pwd) + +printf "parsing install.conf\n" + source $WORKING_DIR/install.conf + if [ "$?" != 0 ]; then + printf "install.conf not found\n" + exit 1 + fi +printf "installing executable\n" +mv $WORKING_DIR/esv $PREFIX/bin + if [ "$?" != 0 ]; then + mv $WORKING_DIR/esv $PREFIX + printf "directory $PREFIX/bin does not exist, moving to $PREFIX instead\n" + fi +printf "installing configuration files\n" +mv $WORKING_DIR/esv.conf $CONFDIR + if [ "$?" != 0 ]; then + printf "$CONFDIR does not exist\n" + printf "this can be corrected by running:\n" + printf "# mkdir -pv $CONFDIR\n" + exit 1 + fi +printf "finished installation\n" +exit 0 diff --git a/src/esv/README b/src/esv/README new file mode 100755 index 0000000..9065ba1 --- /dev/null +++ b/src/esv/README @@ -0,0 +1,22 @@ ++-------------------------+ +| Everest Service Manager | ++-------------------------+ + +Easily manage running services on a Linux system + ++----------------+ +| Installing esv | ++----------------+ + +Copy install.conf.def to install.conf, make +any adjustments, and run INSTALL.sh as root. + ++-------+ +| Usage | ++-------+ + + # esv start + # esv stop + # esv restart + # esv -h + # esv -v diff --git a/src/esv/install.conf.def b/src/esv/install.conf.def new file mode 100755 index 0000000..cbdedd1 --- /dev/null +++ b/src/esv/install.conf.def @@ -0,0 +1,11 @@ +#!/bin/sh +# install.conf + +# Installation prefix +# On Everest, this should be /usr, because /bin, /sbin, and /lib are all symlinks to /usr +PREFIX="/usr" + +# System config directory +# On almost all systems, this should be /etc +# /etc/esv can also work, but requires you to patch the main executable +CONFDIR="/etc"