feature/nextcloud-auto-startstop-scripts #1
Merged
mar
merged 7 commits from feature/nextcloud-auto-startstop-scripts
into master
4 years ago
9 changed files with 53 additions and 53 deletions
@ -1,15 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
if [[ -z $1 ]]; then |
|||
echo "Usage: $0 username" |
|||
exit 2 |
|||
fi |
|||
|
|||
set -e |
|||
|
|||
nc-occ user:add "$1" |
|||
|
|||
mkdir -p /vol/files/"$1" |
|||
chown www-data:www-data /vol/files/"$1" |
|||
|
|||
nc-mntuser "$1" |
@ -1,24 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
if [[ -z $1 ]]; then |
|||
echo "Usage: $0 user" |
|||
exit 2 |
|||
fi |
|||
user=$1 |
|||
|
|||
intdir=/srv/nextcloud/data |
|||
extdir=/vol/files |
|||
|
|||
set -e |
|||
|
|||
nc-occ maintenance:mode --on |
|||
|
|||
mkdir -p $intdir/$user/files |
|||
chown -R www-data:www-data $intdir/$user |
|||
line="$extdir/$user $intdir/$user/files none defaults,bind,nofail 0 0" |
|||
if ! grep -q "$line" /etc/fstab ; then |
|||
echo "$line" >> /etc/fstab |
|||
fi |
|||
mount -a |
|||
|
|||
nc-occ maintenance:mode --off |
@ -0,0 +1,14 @@ |
|||
[Unit] |
|||
Description=Load/Dump database on start/stop |
|||
After=postgresql.service |
|||
Requires=postgresql.service |
|||
|
|||
[Service] |
|||
Type=oneshot |
|||
RemainAfterExit=yes |
|||
EnvironmentFile=/etc/environment |
|||
ExecStart=/usr/local/bin/db-load /vol/data/sql/nextcloud-updown.sql |
|||
ExecStop=/usr/local/bin/db-dump /vol/data/sql/nextcloud-updown.sql |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
@ -0,0 +1,10 @@ |
|||
<?php |
|||
$CONFIG = array( |
|||
/** After your first install, place the auto-generated values for these parameters here |
|||
and uncomment them, so that they persist across re-deploys. */ |
|||
/** |
|||
'passwordsalt' => '', |
|||
'secret' => '', |
|||
'instanceid' => '', |
|||
*/ |
|||
); |
Loading…
Reference in new issue