Nextcloud Purge Script, Hyperling.com Static Media Volume, Memory Tweaks (#19)
* Fix memory; was accidentally done in `docker-compose.yml`. * Fix bad path. * Prevent DB from crashing during `fixes.sh`. * Bump the DB up a little more. * Add photos directory. * Log files as they copy. * Increase certbot by a little, was maxing near 15MB after an image update. * Add a HUGE space saver to the cleanup crew. * Add the beginnings of a purge script. Helps try to bring down the DB size. * Enhance output. * Further enhance output. * Fix loading of ENV. * Enhance output. Purge file previews. * Fix extra newline. * Add sourcing of main ENV, use RM instead of MV to reduce steps. * Fix rm command. * Ensure maintenance mode is off when starting. * Add volume rather than duplicating all media. * Ignore media. * Check space before as well.
This commit is contained in:
@ -6,38 +6,61 @@
|
||||
|
||||
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
||||
PROG="$(basename -- "${BASH_SOURCE[0]}")"
|
||||
source $DIR/../source.env
|
||||
source $DIR/../../source.env
|
||||
|
||||
## Main ##
|
||||
|
||||
echo -e "\n*** APT ***\n"
|
||||
echo -e "\n*** APT ***"
|
||||
|
||||
echo -e "\n`date` - Update Apt Cache"
|
||||
docker exec -it nc-app apt update -y
|
||||
|
||||
echo -e "\n`date` - Install Additonal Software"
|
||||
docker exec -it nc-app apt install -y sudo libmagickcore-6.q16-6-extra htop \
|
||||
iputils-ping dnsutils vim
|
||||
|
||||
# 2023-12-04 Make sure cron and chmod commands get run.
|
||||
echo -e "\n*** CRON ***\n"
|
||||
echo -e "\n*** CRON ***"
|
||||
|
||||
echo -e "\n`date` - Run Cron Job"
|
||||
$DOCKER_HOME/Config/Nextcloud/cron.sh && echo "Success!"
|
||||
|
||||
# 2022-10-30 More additions after moving to Nextcloud version 25.
|
||||
echo -e "\n*** DATABASE ***\n"
|
||||
echo -e "\n*** DATABASE ***"
|
||||
|
||||
echo -e "\n`date` - Add Missing Columns"
|
||||
docker exec -itu www-data nc-app ./occ db:add-missing-columns
|
||||
|
||||
echo -e "\n`date` - Add Missing Indexes"
|
||||
docker exec -itu www-data nc-app ./occ db:add-missing-indices
|
||||
|
||||
echo -e "\n`date` - Add Missing PKs"
|
||||
docker exec -itu www-data nc-app ./occ db:add-missing-primary-keys
|
||||
|
||||
echo -e "\n`date` - Convert Filecache BigInt"
|
||||
docker exec -itu www-data nc-app ./occ db:convert-filecache-bigint
|
||||
|
||||
# 2023-07-02
|
||||
echo -e "\n*** FILES ***\n"
|
||||
echo -e "\n*** FILES ***"
|
||||
|
||||
# This maybe used to exist, but make sure that Files app is correct.
|
||||
echo -e "\n`date` - Scanning All Files"
|
||||
docker exec -itu www-data nc-app ./occ files:scan --all
|
||||
|
||||
# This one takes a while.
|
||||
echo -e "\n`date` - Scanning App Data"
|
||||
docker exec -itu www-data nc-app ./occ files:scan-app-data
|
||||
|
||||
# Extras? Have used the commands in the past and may help in the future.
|
||||
echo -e "\n`date` - Theme Update"
|
||||
docker exec -itu www-data nc-app ./occ maintenance:theme:update
|
||||
echo -e "\n`date` - Repair"
|
||||
docker exec -itu www-data nc-app ./occ maintenance:repair
|
||||
# May alsp be useful but do not have much experience with them.
|
||||
|
||||
# May also be useful but do not have much experience with them.
|
||||
echo -e "\n`date` - Clean Versions"
|
||||
docker exec -itu www-data nc-app ./occ versions:cleanup
|
||||
echo -e "\n`date` - Clean Files"
|
||||
docker exec -itu www-data nc-app ./occ files:cleanup
|
||||
|
||||
exit 0
|
||||
|
||||
|
Reference in New Issue
Block a user