editing readme

This commit is contained in:
Sune 2023-09-07 01:17:48 +02:00
parent f93aec482c
commit ed147bedbe

View file

@ -14,8 +14,10 @@ System requirements:
- at least Java Runtime Environment (JRE) 17
- wget
Debian/Ubuntu:
```sh
debian: $ sudo apt install wget openjdk-17-jre
$ sudo apt install wget openjdk-17-jre
```
### Install system-wide on Linux
@ -23,14 +25,14 @@ debian: $ sudo apt install wget openjdk-17-jre
See [latest version](https://github.com/AsamK/signal-cli/releases).
```sh
export VERSION=<latest version, format "x.y.z">
wget https://github.com/AsamK/signal-cli/releases/download/v"${VERSION}"/signal-cli-"${VERSION}"-Linux.tar.gz
sudo tar xf signal-cli-"${VERSION}"-Linux.tar.gz -C /opt
sudo ln -sf /opt/signal-cli-"${VERSION}"/bin/signal-cli /usr/local/bin/
$ export VERSION=<latest version, format "x.y.z">
$ wget https://github.com/AsamK/signal-cli/releases/download/v"${VERSION}"/signal-cli-"${VERSION}"-Linux.tar.gz
$ sudo tar xf signal-cli-"${VERSION}"-Linux.tar.gz -C /opt
$ sudo ln -sf /opt/signal-cli-"${VERSION}"/bin/signal-cli /usr/local/bin/
```
## Initial Setup
Create user for running the service, --systen creates a system user without home dir and password. :
Create user for running the service, --system creates a system user without home dir and password. :
```sh
# adduser --system --group signal-cli
```
@ -55,19 +57,19 @@ signal-cli$ /usr/local/bin/signal-cli --config /var/lib/signal-cli -u <PHONE NUM
## Setup systemd service and dbus
To run on the system bus you need to take some additional steps. Its advisable to run signal-cli as a separate unix user, the following steps assume you created a user named signal-cli. To run a service on the system bus, a config file is needed to allow the signal-cli user to take a name on the system bus. An example config file can be found in data/org.asamk.Signal.conf. This file also configures that any user can talk with the signal-cli daemon. The data/org.asamk.Signal.service and data/signal-cli.service files configure a dbus activated systemd service for signal-cli, so the service is automatically started when the dbus service is requested.
These steps, executed as root, should work on all distributions using systemd.
Git clone this repo as you will need files from the data folder.
```sh
git clone https://git.data.coop/sune/Signal-cli.git
```
move the files:
These steps, executed as root, should work on all distributions using systemd.
Move the files:
```sh
# mv data/org.asamk.Signal.conf /etc/dbus-1/system.d/
# mv data/org.asamk.Signal.service /usr/share/dbus-1/system-services/
# mv data/signal-cli.service /etc/systemd/system/
```
edit service file to match phone number and enable systemd service:
Edit service file to match phone number and enable systemd service:
```sh
# sed -i -e "s|%number%|<PHONE NUMBER>|" /etc/systemd/system/signal-cli.service
# systemctl daemon-reload