┌───────────────────────┐
│ │
│ help: install │
│ │
└───────────────────────┘
Automatic install:
1. exec in a terminal:
cd path/to/usuaris/admin/INSTALL/
./install_daemon.sh
Manual install:
1. exec in a terminal:
cd path/to/usuaris/admin/INSTALL/
2. copy file:
sudo cp usuaris_daemon.tar.gz /opt
3. untar:
cd /opt/
sudo tar xvzf usuaris_daemon.tar.gz
4. edit: /opt/usuaris/daemon/server.c
char *USER = "YOUR_USER_HERE";
char *PASSWD = "YOUR_SOCKET_PASSWORD_HERE";
5. compile daemon:
cd /opt/usuaris/daemon/
sudo gcc server.c -o server
6. set perms:
sudo chown root:root /opt/usuaris/daemon/server
sudo chmod 0700 /opt/usuaris/daemon/server
sudo chown root:root /opt/usuaris/daemon/server.c
sudo chmod 0600 /opt/usuaris/daemon/server.c
7. service up:
sudo cp /opt/usuaris/daemon/usuaris.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable usuaris.service
8. service start|stop|status:
sudo systemctl [ start | stop | status ] usuaris
Or if you want to see the traffic on the socket, run this command instead of the last one:
sudo /opt/usuaris/daemon/server
If Apache does not display the website at /~user/ ...
On Arch Linux-based systems, to get web content in /~user/ working, edit file
/etc/systemd/system/httpd.service.d/hardening.conf
and set...
ProtectHome=off
Then run...
systemctl daemon-reload
If an ERROR occurs when using 'usuaris' (for example, while creating a user)...
(a)- Edit php-fpm config:
sudo systemctl edit php-fpm
(b)- Add the following lines at the top:
[Service]
PrivateDevices=false
NoNewPrivileges=false
ProtectSystem=yes
(c)- Save file, and restart php-fpm