Chad f56b3da23d
Manage Script, Resource Limits, OnlyOffice Changes (#14)
* Create explicit file for cron, add two automations from fixes.

* Merge the OnlyOffice project into the Nextcloud project. Enhance comments and changelog. Make the container names consistent.

* Found the link. :)

* Add more variables.

* Add a TBD file for mail server.

* Create new script which will replace most the existing single purpose management scripts.

* Add limit to DNS so that if Internet goes out it does not max system resources.

* Prevent OnlyOffice from getting too hungry.

* Ensure Reverse Proxy always has at least some resources.

* Separate build. Add stats -s and combination option -A.

* Make script config file aware. Add comments.

* Add more comments.

* Fix comments.

* Further determine resource allocations.

* Also avoid checking for cron's call to the program.

* Add clean and log parameters. Some clean up.

* Update setups to have DIR first.

* Remove files taken over by manage script.

* Cleaning comments and output.
2023-09-01 05:50:29 -07:00

22 lines
719 B
Bash
Executable File

#!/bin/bash
# 2023-08-25 Hyperling
# Put the cron command in a script as well as other automation.
# This should be added to root's crontab with the full path, such as:
# */5 * * * * /opt/Docker/Config/Nextcloud/cron.ksh
# Check if a job is already going.
PROG="$(basename -- "${BASH_SOURCE[0]}")"
RUNNING=`ps -ef | grep $PROG | grep -v grep | grep -v $$ | grep -v "sh -c" | wc -l`
if (( $RUNNING > 0 )); then
exit $RUNNING
fi
# 2023-08-25 From crontab.
docker exec -u www-data nc-app php cron.php --define apc.enable_cli=1
# 2023-08-25 From fixes.sh, keep ownership correct and apps up to date.
docker exec -it nc-app chown -Rc www-data:www-data .
docker exec -itu www-data nc-app ./occ app:update --all
exit 0