-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix access right to the volume repository from www-data user in the c…
…ontainer
- Loading branch information
David Bariod
committed
Apr 7, 2018
1 parent
65f4894
commit d8ee503
Showing
3 changed files
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
die() { | ||
echo $0 | ||
exit 1 | ||
} | ||
|
||
cd /wiki | ||
git status 2>&1 > /dev/null | ||
if [[ $? -ne 0 ]] ; then | ||
die "Can not find a git repository at /wiki" | ||
fi | ||
cd - | ||
|
||
set -e | ||
git clone --bare /wiki /var/www/wiki.git | ||
chown -R www-data: /var/www/wiki.git | ||
tmpfile=$(mktemp) | ||
cat > $tmpfile <<EOF | ||
#!/bin/bash | ||
git clone /var/www/wiki.git /var/www/wiki-src | ||
ikiwiki --setup /etc/ikiwiki/ikiwiki.setup --rebuild --wrappers | ||
EOF | ||
chmod 755 $tmpfile | ||
su www-data -c $tmpfile | ||
|
||
echo "The setup script has been run" |