Created
December 15, 2017 12:05
-
-
Save IljaN/ecbd1934f52b336b5cbf621ce28d13e7 to your computer and use it in GitHub Desktop.
Owncloud dev reset script
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
#!/bin/bash | |
# A script to quickly reset your local owncloud. | |
# WARNING: Your Database and data directory will be deleted!!! | |
# A user admin with password admin is created. | |
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
DATA_DIR=$CURRENT_DIR/data | |
OWNCLOUD_URL=http://localhost:8000 | |
# Kill current config and data | |
rm ./config/config.php | |
rm -rf ./data | |
cat << EOF > ./config/autoconfig.php | |
<?php | |
\$AUTOCONFIG = array( | |
"dbtype" => "sqlite", | |
"dbname" => "owncloud", | |
"dbtableprefix" => "", | |
"adminlogin" => "admin", | |
"adminpass" => "admin", | |
"directory" => "$DATA_DIR", | |
); | |
EOF | |
# Install | |
make | |
# Trigger setup | |
curl -L ${OWNCLOUD_URL} | |
sleep 2s | |
git checkout ./.htaccess | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment