0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-21 11:06:09 +02:00

feat: Allow custom script execution on installation

This commit is contained in:
loxeno 2022-01-26 21:28:04 +01:00
parent a9af37b1ec
commit 78db690d10
11 changed files with 44 additions and 0 deletions

View file

@ -174,6 +174,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi

View file

@ -174,6 +174,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi

View file

@ -174,6 +174,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi

View file

@ -174,6 +174,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi

View file

@ -174,6 +174,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi

View file

@ -174,6 +174,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi

View file

@ -174,6 +174,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi

View file

@ -174,6 +174,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi

View file

@ -174,6 +174,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi

View file

@ -133,6 +133,10 @@ One or more trusted domains can be set through environment variable, too. They w
- `NEXTCLOUD_TRUSTED_DOMAINS` (not set by default) Optional space-separated list of domains
To install custom apps, or execute occ commands, you can provide the path to a script that is run in the context of the www-data user.
- `NEXTCLOUD_CUSTOM_INSTALL_SCRIPT` (not set by default) The path to a script that is mounted as volume.
The install and update script is only triggered when a default command is used (`apache-foreground` or `php-fpm`). If you use a custom command you have to enable the install / update with
- `NEXTCLOUD_UPDATE` (default: `0`)

View file

@ -174,6 +174,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi
if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi