Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/paraffin/ drwxr-xr-x | |
| Viewing file: Select action/file-type: #!/bin/bash
# exit when any command fails
set -e
# keep track of the last executed command
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
# echo an error message before exiting
trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT
Normal='\e[0m'
Green='\e[32m'
Red='\e[91m'
LightGreeen='\e[92m'
LightYellow='\e[93m'
echo -e "> \e[92m Paraffin IoT Platform is running..." && echo ''
file_paraffin="./paraffin"
file_broker="./broker.env"
file_apiserver="./apiserver.env"
if [ -f "$file_paraffin" ]
then
echo "" && echo -e "${LightGreen}$file_paraffin is exist."
exit 1
else
sudo git clone https://github.com/ParaffinIoT/paraffin
fi
if [ -f "$file_broker" ]
then
echo "" && echo "$file_broker found."
mv ./broker.env ./paraffin/broker.env
else
echo "" && echo -e "${LightYellow}$file_broker not found." && echo -e "${Normal}"
echo "Default broker.env is loading."
fi
if [ -f "$file_apiserver" ]
then
echo "" && echo "$file_apiserver found."
mv ./apiserver.env ./paraffin/apiserver.env
else
echo "" && echo -e "${LightYellow}$file_apiserver not found." && echo -e "${Normal}"
echo "Default apiserver.env is loading."
fi
cd ./paraffin
echo "" && echo -e "> ${LightGreen} Docker goes to deploy Paraffin services..." && echo -e "${Normal}>..."
sudo docker-compose up
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0132 ]-- |