JohnnyBravo
Verified User
- Joined
- Aug 24, 2018
- Messages
- 37
The installation of redis went fine, also one user is using it on my server. But when I want to enable it to another user(website) on the same server, I get the following error for this command:
After
redis isn't functioning anymore for all users...
nano /etc/systemd/system/[email protected] gives:
Code:
systemctl status [email protected]
[/etc/systemd/system/[email protected]:10] Executable path is not absolute, ignoring: -+/bin/sh -c "if [ -d /sys/fs/cgroup/user.slice ]; then mkdir -p /sys/fs/cgroup/user.slice/u...
After
Code:
systemctl start [email protected]
Code:
Failed to start Multi-user redis persistent key-value database.
Code:
nano /usr/local/directadmin/data/users/user2/redis.conf
supervised systemd
port 0
unixsocket /home/user2/.redis/redis.sock
unixsocketperm 770
maxmemory 512MB
maxmemory-samples 6
requirepass PASSWORD
nano /etc/systemd/system/[email protected] gives:
Code:
[Unit]
Description=Multi-user redis persistent key-value database
After=network.target
Documentation=http://redis.io/documentation, man:redis-server(1)
[Service]
User=%i
Group=%i
ExecStartPre=-/bin/mkdir -p ${HOME}/.redis/db/
ExecStartPost=-+/bin/sh -c "if [ -d /sys/fs/cgroup/user.slice ]; then mkdir -p /sys/fs/cgroup/user.slice/user-$(id -u ${USER}).slice/directadmin-exec.scope; echo $MAINPID > /sys/fs/cgroup/user.slice/user-$(id -u ${USER}).sl$
ExecStart=/usr/local/bin/redis-server --include /usr/local/directadmin/data/users/${USER}/redis.conf --supervised systemd --dir ${HOME}/.redis/db/ --port 0 --unixsocket ${HOME}/.redis/redis.sock --unixsocketperm 770
Type=notify
RuntimeDirectory=redis
RuntimeDirectoryMode=0755
UMask=007
LimitNOFILE=65535
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
[Install]
WantedBy=multi-user.target