Fixed leftover wrong formats
This commit is contained in:
parent
32b156de81
commit
e170f72947
|
@ -6,37 +6,37 @@ for i in "${containers[@]}"; do
|
|||
case "$2" in
|
||||
"start")
|
||||
if (( $(echo "${dockercont}" | grep -c "$i") > 0 )); then
|
||||
output "warn Container $i was already up and running!"
|
||||
echo "warn Container $i was already up and running!"
|
||||
else
|
||||
if (docker start "$i" > /dev/null 2>&1); then
|
||||
output "done Started container $i succesfully!"
|
||||
echo "done Started container $i succesfully!"
|
||||
else
|
||||
output "erro Failed to start container $i!"
|
||||
echo "erro Failed to start container $i!"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
"stop")
|
||||
if (( $(echo "${dockercont}" | grep -c "$i") > 0 )); then
|
||||
if (docker stop --time=20 "$i" > /dev/null 2>&1); then
|
||||
output "done Stopped container $i succesfully!"
|
||||
echo "done Stopped container $i succesfully!"
|
||||
else
|
||||
output "erro Failed to stop container $i!"
|
||||
echo "erro Failed to stop container $i!"
|
||||
fi
|
||||
else
|
||||
output "warn Container $i was already stopped!"
|
||||
echo "warn Container $i was already stopped!"
|
||||
fi
|
||||
;;
|
||||
"status")
|
||||
if (( $(echo "${dockercont}" | grep -c "$i") > 0 )); then
|
||||
output "warn Container $i is up and running!"
|
||||
echo "warn Container $i is up and running!"
|
||||
else
|
||||
output "erro Container $i is stopped!"
|
||||
echo "erro Container $i is stopped!"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
elif (systemctl -q is-active docker); then
|
||||
output "erro An error has occured, we are sorry!"
|
||||
echo "erro An error has occured, we are sorry!"
|
||||
else
|
||||
output "erro Docker is stopped, cannot perform check!"
|
||||
echo "erro Docker is stopped, cannot perform check!"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
if [ -x "$(command -v docker)" ]; then
|
||||
output "info Clearing Docker remainings"
|
||||
echo "info Clearing Docker remainings"
|
||||
docker system prune --all -f
|
||||
fi
|
||||
case $(uname -rv) in
|
||||
*Ubuntu*)
|
||||
output "info Clearing & Updating APT"
|
||||
echo "info Clearing & Updating APT"
|
||||
apt-get -y update
|
||||
apt-get -y autoclean
|
||||
apt-get -y autoremove
|
||||
;;
|
||||
esac
|
||||
|
||||
output "info Clearing logs"
|
||||
echo "info Clearing logs"
|
||||
if [ -x "$(command -v nginx)" ]; then
|
||||
truncate -s 0 "${LOGPATH:-/var/log/nginx/*.*}"
|
||||
fi
|
||||
|
|
|
@ -2,14 +2,14 @@ case "$2" in
|
|||
"update")
|
||||
cd /var/www/pterodactyl || exit
|
||||
php artisan down
|
||||
output "info Fetching latest releases"
|
||||
echo "info Fetching latest releases"
|
||||
curl -L https://github.com/pterodactyl/panel/releases/download/"$(getlatest "Pterodactyl/panel")"/panel.tar.gz | tar --strip-components=1 -xzv
|
||||
curl -L https://github.com/RXCommunity/RedXen-Panel/archive/"$(getlatest "RXCommunity/RedXen-Panel")".tar.gz | tar --strip-components=1 -xzv
|
||||
output "info Ensuring permissions are correct"
|
||||
echo "info Ensuring permissions are correct"
|
||||
chown -R www-data:www-data ./*
|
||||
chmod -R 755 storage/* bootstrap/cache
|
||||
output "info Getting latest deps"
|
||||
composer install --no-dev --optimize-autoloader || output "erro Failed to get deps!"
|
||||
echo "info Getting latest deps"
|
||||
composer install --no-dev --optimize-autoloader || echo "erro Failed to get deps!"
|
||||
|
||||
artisanfunc=(
|
||||
"view:clear"
|
||||
|
@ -21,10 +21,10 @@ case "$2" in
|
|||
"up"
|
||||
)
|
||||
|
||||
output "info Running migrations and clearance"
|
||||
echo "info Running migrations and clearance"
|
||||
for f in "${artisanfunc[@]}"; do
|
||||
php artisan $f || output "erro Failed to execute 'artisan ${f}'"
|
||||
php artisan $f || echo "erro Failed to execute 'artisan ${f}'"
|
||||
done
|
||||
;;
|
||||
*); echo "Nothing to do";;
|
||||
*); echo "warn Nothing to do";;
|
||||
esac
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
for i in ${#DIRS[@]}; do
|
||||
echo "info" "Syncing ${DIRS[$I]##*${DELIMIT}} with ${DIRS[$I]%%${DELIMIT}*}"
|
||||
(rclone sync -P ${DIRS[$I]%%${DELIMIT}*} ${DIRS[$I]##*${DELIMIT}}) > /dev/null 2>&1
|
||||
done
|
Reference in New Issue