Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2020-08-28 18:52:02 +0300
committernachoparker <nacho@ownyourbits.com>2020-11-28 00:54:34 +0300
commit92156694f683d490a6bc2426e20dd356789d913b (patch)
tree3b53f52550b4a0f5657112c474e1dcaebe547c2a /bin
parentab9184cadd91ff3fbacf4e82aa582edccd5a7fc6 (diff)
pre-initialize docker image
Signed-off-by: nachoparker <nacho@ownyourbits.com>
Diffstat (limited to 'bin')
-rw-r--r--bin/ncp/CONFIG/nc-init.sh14
-rw-r--r--bin/ncp/NETWORKING/dnsmasq.sh8
2 files changed, 10 insertions, 12 deletions
diff --git a/bin/ncp/CONFIG/nc-init.sh b/bin/ncp/CONFIG/nc-init.sh
index e7a7b808..629e88ac 100644
--- a/bin/ncp/CONFIG/nc-init.sh
+++ b/bin/ncp/CONFIG/nc-init.sh
@@ -30,13 +30,11 @@ configure()
fi
# wait for mariadb
- pgrep -x mysqld &>/dev/null || {
- echo "mariaDB process not found. Waiting..."
- while :; do
- [[ -S /run/mysqld/mysqld.sock ]] && break
- sleep 0.5
- done
- }
+ while :; do
+ [[ -S /run/mysqld/mysqld.sock ]] && break
+ sleep 0.5
+ done
+ sleep 1
# workaround to emulate DROP USER IF EXISTS ..;)
local DBPASSWD=$( grep password /root/.my.cnf | sed 's|password=||' )
@@ -159,8 +157,8 @@ EOF
# ncp-previewgenerator
cp -r /var/www/ncp-previewgenerator /var/www/nextcloud/apps/previewgenerator
- ncc app:enable previewgenerator
chown www-data:www-data /var/www/nextcloud/apps/previewgenerator
+ ncc app:enable previewgenerator
# previews
ncc config:app:set previewgenerator squareSizes --value="32 256"
diff --git a/bin/ncp/NETWORKING/dnsmasq.sh b/bin/ncp/NETWORKING/dnsmasq.sh
index 4ef1234e..9f38baac 100644
--- a/bin/ncp/NETWORKING/dnsmasq.sh
+++ b/bin/ncp/NETWORKING/dnsmasq.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# dnsmasq DNS server with cache installation on Raspbian
+# dnsmasq DNS server with cache installation on Raspbian
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
@@ -41,7 +41,7 @@ EOF
configure()
{
- [[ $ACTIVE != "yes" ]] && {
+ [[ $ACTIVE != "yes" ]] && {
service dnsmasq stop
update-rc.d dnsmasq disable
echo "dnmasq disabled"
@@ -53,14 +53,14 @@ configure()
[[ "$IP" == "" ]] && IP=$( ip a show dev "$IFACE" | grep global | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 )
[[ "$IP" == "" ]] && { echo "could not detect IP"; return 1; }
-
+
cat > /etc/dnsmasq.conf <<EOF
interface=$IFACE
domain-needed # Never forward plain names (without a dot or domain part)
bogus-priv # Never forward addresses in the non-routed address spaces.
no-poll # Don't poll for changes in /etc/resolv.conf
no-resolv # Don't use /etc/resolv.conf or any other file
-cache-size=$CACHESIZE
+cache-size=$CACHESIZE
server=$DNSSERVER
address=/$DOMAIN/$IP # This is optional if we add it to /etc/hosts
EOF