share/INSTALL.md
2022-10-25 10:24:41 +02:00

33 lines
725 B
Markdown

# INSTALACIÓN
## OpenBSD
### Crear usuario e grupo
```sh
groupadd _sh4rin
mkdir -p /home/_sh4rin/uploads
useradd -d /home/_sh4rin/uploads/ -c "sh4rin service" -g _sh4rin -L daemon -s /sbin/nologin _sh4rin
chown -R _sh4rin:_sh4rin /home/_sh4rin/
chmod -R 700 /home/_sh4rin/
```
### Compilar e instalar executable
```sh
git clone https://git.tr4ck.net/serxoz/share.git
cd share
cargo build --release
doas cp target/release/share /usr/local/bin/share
```
### Configurar rc.d
- Copia o script de arranque:
```sh
doas cp sh4rin-openbsd-rc.d /etc/rc.d/sh4rin
```
- Configura no script as variables de entorno en env.
- Agrega en /etc/rc.conf.local o script a pkg_scripts
- Inicia o servicio:
```sh
/etc/rc.d/sh4rin start
```