Skip to content

Commit

Permalink
build: replace user pi for user ncp
Browse files Browse the repository at this point in the history
  • Loading branch information
nacho committed Nov 4, 2017
1 parent b114279 commit 8f28660
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

[v0.32.0](https://github.com/nextcloud/nextcloudpi/commit/6d0651b) (2017-11-03) spDYN: initial adjustments
[v0.32.1](https://github.com/nextcloud/nextcloudpi/commit/b9f5c95) (2017-11-04) build: replace user pi for user ncp

[v0.32.0 ](https://github.com/nextcloud/nextcloudpi/commit/8c70198) (2017-11-03) spDYN: initial adjustments

[v0.31.29](https://github.com/nextcloud/nextcloudpi/commit/727e64f) (2017-11-02) ncp-web: fix timeout in long operations

Expand Down
14 changes: 12 additions & 2 deletions nextcloudpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# More at https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/
#

WEBADMIN=ncp
WEBPASSWD=ownyourbits

CONFDIR=/usr/local/etc/nextcloudpi-config.d/
UPLOADTMPDIR=/var/www/nextcloud/data/tmp
APTINSTALL="apt-get install -y --no-install-recommends"
Expand All @@ -34,7 +37,9 @@ install()

# NEXTCLOUDPI-CONFIG WEB
##########################################
cat > /etc/apache2/sites-available/ncp.conf <<'EOF'

# VIRTUAL HOST
cat > /etc/apache2/sites-available/ncp.conf <<EOF
Listen 4443
<VirtualHost _default_:4443>
DocumentRoot /var/www/ncp-web
Expand Down Expand Up @@ -74,7 +79,7 @@ Listen 4443
<RequireAny>
Require env noauth
Require user pi
Require user $WEBADMIN
</RequireAny>
</RequireAll>
Expand All @@ -85,6 +90,11 @@ EOF
a2enmod authnz_external authn_core auth_basic
a2ensite ncp

# NCP USER FOR AUTHENTICATION
useradd $WEBADMIN
echo -e "$WEBPASSWD\n$WEBPASSWD" | passwd $WEBADMIN

# NCP LAUNCHER
mkdir /home/www -p
chown www-data:www-data /home/www
chmod 700 /home/www
Expand Down

0 comments on commit 8f28660

Please sign in to comment.