Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
d28563fb
Commit
d28563fb
authored
Jun 14, 2015
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweak the ownCloud config location migration (no need for third ln)
parent
38632f0f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
owncloud.sh
setup/owncloud.sh
+10
-10
No files found.
setup/owncloud.sh
View file @
d28563fb
...
@@ -18,14 +18,15 @@ apt-get purge -qq -y owncloud*
...
@@ -18,14 +18,15 @@ apt-get purge -qq -y owncloud*
owncloud_ver
=
8.0.3
owncloud_ver
=
8.0.3
owncloud_hash
=
3192f3d783f81247eaf2914df63afdd593def4e5
owncloud_hash
=
3192f3d783f81247eaf2914df63afdd593def4e5
# Migrate existing configurations
# Migrate <= v0.10 setups that stored the ownCloud config.php in /usr/local rather than
# in STORAGE_ROOT. Move the file to STORAGE_ROOT.
if
[
!
-f
$STORAGE_ROOT
/owncloud/config.php
]
\
if
[
!
-f
$STORAGE_ROOT
/owncloud/config.php
]
\
&&
[
-f
/usr/local/lib/owncloud/config/config.php
]
;
then
&&
[
-f
/usr/local/lib/owncloud/config/config.php
]
;
then
# Move config.php
# Move config.php
and symlink back into previous location.
mv
/usr/local/lib/owncloud/config/config.php
$STORAGE_ROOT
/owncloud/config.php
echo
"Migrating owncloud/config.php to new location."
mv
/usr/local/lib/owncloud/config/config.php
$STORAGE_ROOT
/owncloud/config.php
\
# Symlink OwnCloud's config
&&
\
ln
-sf
$STORAGE_ROOT
/owncloud/config.php /usr/local/lib/owncloud/config/config.php
ln
-sf
$STORAGE_ROOT
/owncloud/config.php /usr/local/lib/owncloud/config/config.php
fi
fi
...
@@ -55,7 +56,8 @@ if [ ! -d /usr/local/lib/owncloud/ ] \
...
@@ -55,7 +56,8 @@ if [ ! -d /usr/local/lib/owncloud/ ] \
# Fix weird permissions.
# Fix weird permissions.
chmod
750 /usr/local/lib/owncloud/
{
apps,config
}
chmod
750 /usr/local/lib/owncloud/
{
apps,config
}
# Make sure our symlink exists
# Create a symlink to the config.php in STORAGE_ROOT (for upgrades we're restoring the symlink we previously
# put in, and in new installs we're creating a symlink and will create the actual config later).
ln
-sf
$STORAGE_ROOT
/owncloud/config.php /usr/local/lib/owncloud/config/config.php
ln
-sf
$STORAGE_ROOT
/owncloud/config.php /usr/local/lib/owncloud/config/config.php
# Make sure permissions are correct or the upgrade step won't run.
# Make sure permissions are correct or the upgrade step won't run.
...
@@ -135,14 +137,12 @@ EOF
...
@@ -135,14 +137,12 @@ EOF
?>
?>
EOF
EOF
# Link ownCloud's config
ln
-sf
$STORAGE_ROOT
/owncloud/config.php /usr/local/lib/owncloud/config/config.php
# Set permissions
# Set permissions
chown
-R
www-data.www-data
$STORAGE_ROOT
/owncloud /usr/local/lib/owncloud
chown
-R
www-data.www-data
$STORAGE_ROOT
/owncloud /usr/local/lib/owncloud
# Execute ownCloud's setup step, which creates the ownCloud sqlite database.
# Execute ownCloud's setup step, which creates the ownCloud sqlite database.
# It also wipes it if it exists. And it deletes the autoconfig.php file.
# It also wipes it if it exists. And it updates config.php with database
# settings and deletes the autoconfig.php file.
(
cd
/usr/local/lib/owncloud
;
sudo
-u
www-data php /usr/local/lib/owncloud/index.php
;
)
(
cd
/usr/local/lib/owncloud
;
sudo
-u
www-data php /usr/local/lib/owncloud/index.php
;
)
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment