Glacier v3.0.0
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Glacier Installation Script
|
||||
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "[ X ] Please run Glacier installation script as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
mv ../scripts/glacier.conf /etc
|
||||
mkdir /etc/glacier && echo "[ i ] Creating Glacier directory..."
|
||||
mkdir /etc/glacier/pkginfo && echo "[ i ] Creating Glacier package list directory..."
|
||||
mkdir /var/cache/glacier && echo "[ i ] Creating Glacier package cache..."
|
||||
mkdir /var/log/glacier && echo "[ i ] Creating Glacier timestamp log..."
|
||||
mv ../scripts/hooks.sh /etc/glacier
|
||||
chmod +x ../scripts/glacier
|
||||
echo "[ i ] Installing glacier..."
|
||||
cd ../scripts
|
||||
mv glacier /bin
|
||||
mv GLACIER_INTEGRITY_CHECK /bin
|
||||
touch /etc/make.conf
|
||||
printf "[ i ] Glacier has finished installing."
|
||||
45
install/INSTALL.sh
Executable file
45
install/INSTALL.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
printf "must be run as root\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WORKING_DIR=$(pwd)
|
||||
SRC_DIR=$(pwd)/../src
|
||||
|
||||
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 $SRC_DIR/glacier $PREFIX/bin
|
||||
if [ "$?" != 0 ]; then
|
||||
mv $SRC_DIR/glacier $PREFIX
|
||||
printf "directory $PREFIX/bin does not exist, moving to $PREFIX instead\n"
|
||||
fi
|
||||
printf "installing configuration files\n"
|
||||
mv $SRC_DIR/glacier.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
|
||||
|
||||
mkdir /opt/glacier
|
||||
mkdir /opt/glacier/workspace
|
||||
mkdir /var/log/glacier
|
||||
mkdir /var/cache/glacier
|
||||
|
||||
mkdir /etc/glacier
|
||||
mkdir /etc/glacier/pkginfo
|
||||
|
||||
mv $SRC_DIR/hooks $CONFDIR/glacier
|
||||
mv $SRC_DIR/hooks.sh $CONFDIR/glacier
|
||||
mv $SRC_DIR/make.conf $CONFDIR
|
||||
|
||||
printf "finished installation\n"
|
||||
exit 0
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Require the script to be run as root
|
||||
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
||||
echo "[ X ] Please run Glacier uninstallation as root."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "[ ! ] It is recommended to uninstall all Glacier packages before uninstalling Glacier."
|
||||
echo "[ ! ] This will prevent untracked packages from remaining on your system and possibly creating a security risk."
|
||||
echo "[ ! ] To see which packages are installed on your system, run the following command:"
|
||||
echo "[ ! ] ls /etc/glacier/pkginfo"
|
||||
while true; do
|
||||
read -p "[ ? ] Would you like to uninstall Glacier?" yn
|
||||
case $yn in
|
||||
[Yy]* ) rm -rf /etc/glacier && rm -rf /var/cache/glacier && rm -rf /var/log/glacier && rm /bin/glacier; break;;
|
||||
[Nn]* ) exit;;
|
||||
* ) echo "[ ! ] You must answer either yes or no.";;
|
||||
esac
|
||||
done
|
||||
9
install/UNINSTALL.sh
Executable file
9
install/UNINSTALL.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm -rf /etc/glacier
|
||||
rm -rf /var/log/glacier
|
||||
rm -rf /var/cache/glacier
|
||||
rm -rf /opt/glacier
|
||||
|
||||
rm /bin/glacier
|
||||
|
||||
Binary file not shown.
10
install/install.conf.def
Executable file
10
install/install.conf.def
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/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
|
||||
CONFDIR="/etc"
|
||||
Reference in New Issue
Block a user