Skip to content

Commit

Permalink
Adds installation script for linux from archive
Browse files Browse the repository at this point in the history
Signed-off-by: Saahil Bhavsar <saahil_bhavsar@outlook.com>
  • Loading branch information
SaahilNotSahil committed Apr 12, 2024
1 parent 52b4b65 commit 5dc0e9e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Check if script is run as root
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root. Restarting as root..."
sudo "$0" "$@"
exit $?
fi

# Define directories
binDir="bin"
configDir="scripts"
installDir="/usr/bin"
configInstallDir="/etc/spok"
readmeDir="/usr/share/doc/spok"
licenseDir="/usr/share/licenses/spok"

# Create installation directories if they don't exist
mkdir -p "$configInstallDir"
mkdir -p "$readmeDir"
mkdir -p "$licenseDir"

# Copy binaries
cp "$binDir/spok" "$installDir"
cp "$configDir/configure-spok-server.sh" "$configInstallDir"
cp "README.md" "$readmeDir"
cp "LICENSE" "$licenseDir"

echo "Installation of SPoK completed successfully!"

0 comments on commit 5dc0e9e

Please sign in to comment.