6 changed files with 31 additions and 67 deletions
@ -0,0 +1,21 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
if [[ -z $1 ]]; then |
||||
|
echo "Usage: $0 username" |
||||
|
exit 2 |
||||
|
fi |
||||
|
|
||||
|
set -e |
||||
|
|
||||
|
nc-occ user:add "$1" |
||||
|
|
||||
|
nc-occ maintenance:mode --on |
||||
|
|
||||
|
mkdir -p /vol/files/"$1" |
||||
|
chown www-data:www-data /vol/files/"$1" |
||||
|
|
||||
|
rsync -vaSH /srv/nextcloud/data/"$1"/files/ /vol/files/"$1"/ |
||||
|
rm -r /srv/nextcloud/data/"$1"/files |
||||
|
ln -s /vol/files/"$1" /srv/nextcloud/data/"$1"/files |
||||
|
|
||||
|
nc-occ maintenance:mode --off |
@ -1,2 +0,0 @@ |
|||||
#!/bin/sh |
|
||||
sed -i '/session required pam_loginuid.so/c\#session required pam_loginuid.so' /etc/pam.d/cron |
|
@ -1,46 +0,0 @@ |
|||||
[Unit] |
|
||||
Description=Advanced key-value store |
|
||||
After=network.target |
|
||||
Documentation=http://redis.io/documentation, man:redis-server(1) |
|
||||
|
|
||||
[Service] |
|
||||
Type=forking |
|
||||
ExecStart=/usr/bin/redis-server /etc/redis/redis.conf |
|
||||
ExecStop=/bin/kill -s TERM $MAINPID |
|
||||
PIDFile=/run/redis/redis-server.pid |
|
||||
TimeoutStopSec=0 |
|
||||
Restart=always |
|
||||
User=redis |
|
||||
Group=redis |
|
||||
RuntimeDirectory=redis |
|
||||
RuntimeDirectoryMode=2755 |
|
||||
|
|
||||
UMask=007 |
|
||||
#PrivateTmp=yes |
|
||||
LimitNOFILE=65535 |
|
||||
#PrivateDevices=yes |
|
||||
#ProtectHome=yes |
|
||||
#ReadOnlyDirectories=/ |
|
||||
#ReadWritePaths=-/var/lib/redis |
|
||||
#ReadWritePaths=-/var/log/redis |
|
||||
#ReadWritePaths=-/var/run/redis |
|
||||
|
|
||||
NoNewPrivileges=true |
|
||||
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE |
|
||||
MemoryDenyWriteExecute=true |
|
||||
#ProtectKernelModules=true |
|
||||
#ProtectKernelTunables=true |
|
||||
#ProtectControlGroups=true |
|
||||
RestrictRealtime=true |
|
||||
RestrictNamespaces=true |
|
||||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX |
|
||||
|
|
||||
# redis-server can write to its own config file when in cluster mode so we |
|
||||
# permit writing there by default. If you are not using this feature, it is |
|
||||
# recommended that you replace the following lines with "ProtectSystem=full". |
|
||||
#ProtectSystem=true |
|
||||
#ReadWritePaths=-/etc/redis |
|
||||
|
|
||||
[Install] |
|
||||
WantedBy=multi-user.target |
|
||||
Alias=redis.service |
|
Loading…
Reference in new issue