esv v1.0.0

This commit is contained in:
lw-everestlinux 2022-10-11 12:12:23 -04:00
parent bee57f10ad
commit 6711dab4dc
3 changed files with 64 additions and 0 deletions

31
src/esv/INSTALL.sh Executable file
View File

@ -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

22
src/esv/README Executable file
View File

@ -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

11
src/esv/install.conf.def Executable file
View File

@ -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"