sleep timer configuration
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Paolo Asperti 2021-05-04 17:13:05 +02:00
parent ee9f24e1ba
commit 9e447a570e
Signed by: paspo
GPG Key ID: 06D46905D19D5182
3 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,7 @@ ENV NEXTCLOUD_DOWNLIMIT=
ENV NEXTCLOUD_EXCLUDEFILE=
ENV NEXTCLOUD_UNSYNCFILE=
ENV NEXTCLOUD_SILENT=
ENV NEXTCLOUD_SLEEP=30
COPY start.sh /start.sh

View File

@ -62,6 +62,7 @@ docker-compose up -d
| NEXTCLOUD_EXCLUDEFILE | | Path to a file, inside the container, which contains a list of excluded directories/files |
| NEXTCLOUD_UNSYNCFILE | | Path to a file, inside the container, which contains a list of remote unsynced folders (selective sync) |
| NEXTCLOUD_SILENT | | If set to "1", the client will run in silent mode, with a lot less log messages |
| NEXTCLOUD_SLEEP | 30 | Seconds of sleep time between every client runs |
| USER_NAME | nextcloudclient | Internal username used by nextcloud client |
| USER_UID | 1000 | Internal UID used by nextcloud client |
| USER_GID | 1000 | Internal GID used by nextcloud client |

View File

@ -9,6 +9,7 @@ NEXTCLOUD_PASSWORD=${NEXTCLOUD_PASSWORD:-password}
NEXTCLOUD_URL=${NEXTCLOUD_URL:-https://nextcloud.example.com}
NEXTCLOUD_DIR=${NEXTCLOUD_DIR:-/data}
NEXTCLOUD_DIR_CHOWN=${NEXTCLOUD_DIR_CHOWN:-1}
NEXTCLOUD_SLEEP=${NEXTCLOUD_SLEEP:-30}
# check if group already exists
GRP_NAME=$(getent group ${USER_GID} )
@ -70,5 +71,5 @@ PARAMS="${PARAMS} --non-interactive -u ${NEXTCLOUD_USERNAME} -p ${NEXTCLOUD_PASS
# main loop
while true; do
/bin/su -s /bin/sh ${USER_NAME} -c "/usr/bin/nextcloudcmd ${PARAMS}"
sleep 10
sleep ${NEXTCLOUD_SLEEP}
done