-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare.sh
executable file
·42 lines (31 loc) · 1.25 KB
/
prepare.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
echo "Starting osTicket installation..."
# Create a temporary directory to hold the unzipped files
echo "Creating temporary directory..."
mkdir -p ./temp
# Unzip the main osTicket zip file
echo "Unzipping osTicket.zip..."
unzip ./osTicket.zip -d ./temp
# Unzip the osTicket version specific zip file
echo "Unzipping osTicket version specific file..."
unzip ./temp/osTicket-*.zip -d ./temp/
# Copy the 'upload' directory to the 'app' directory
echo "Copying 'upload' directory to 'app' directory..."
rm -rf ./app
cp -r ./temp/upload ./app
# Copy language files to the 'app/include/i18n/' directory
echo "Copying language files..."
cp -r ./temp/vi.phar ./app/include/i18n/
# Copy all .phar plugin files to the 'app/include/plugins/' directory
echo "Copying plugin files..."
cp -r ./temp/*.phar ./app/include/plugins/
# Copy the sample configuration file to create a new configuration file
echo "Creating new configuration file from sample..."
cp ./app/include/ost-sampleconfig.php ./app/include/ost-config.php
chmod 0666 ./app/include/ost-config.php
# Remove the temporary directory and all its contents
echo "Cleaning up temporary files..."
rm -rf ./temp
echo "osTicket installed successfully!"