Fix formatting

This commit is contained in:
Norm 2022-07-29 02:12:30 -04:00
parent 8e30c86a9a
commit c4415e9af3
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE

View file

@ -77,16 +77,16 @@ If you're still encountering errors about some modules, use node-gyp:
user that will later run FoundKey, or it could cause problems later. user that will later run FoundKey, or it could cause problems later.
The encoding of the database should be UTF-8. The encoding of the database should be UTF-8.
```sh ```sh
sudo -u postgres psql sudo -u postgres psql
``` ```
```sql ```sql
create database foundkey with encoding = 'UTF8'; create database foundkey with encoding = 'UTF8';
create user foundkey with encrypted password '{YOUR_PASSWORD}'; create user foundkey with encrypted password '{YOUR_PASSWORD}';
grant all privileges on database foundkey to foundkey; grant all privileges on database foundkey to foundkey;
\q \q
``` ```
2. Run the database initialisation 2. Run the database initialisation
`yarn run init` `yarn run init`
@ -106,27 +106,25 @@ Just `NODE_ENV=production npm start`. GLHF!
2. Edit it, and paste this and save: 2. Edit it, and paste this and save:
```ini
[Unit]
Description=FoundKey daemon
```ini [Service]
[Unit] Type=simple
Description=FoundKey daemon User=foundkey
ExecStart=/usr/bin/npm start
[Service] WorkingDirectory=/home/foundkey/foundkey
Type=simple Environment="NODE_ENV=production"
User=foundkey TimeoutSec=60
ExecStart=/usr/bin/npm start StandardOutput=syslog
WorkingDirectory=/home/foundkey/foundkey StandardError=syslog
Environment="NODE_ENV=production" SyslogIdentifier=foundkey
TimeoutSec=60 Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=foundkey
Restart=always
[Install]
WantedBy=multi-user.target
```
[Install]
WantedBy=multi-user.target
```
3. Reload systemd and enable the foundkey service. 3. Reload systemd and enable the foundkey service.
@ -142,29 +140,29 @@ You can check if the service is running with `systemctl status foundkey`.
1. Copy the following text to `/etc/init.d/foundkey`: 1. Copy the following text to `/etc/init.d/foundkey`:
```sh ```sh
#!/sbin/openrc-run #!/sbin/openrc-run
name=foundkey name=foundkey
description="FoundKey daemon" description="FoundKey daemon"
command="/usr/bin/npm" command="/usr/bin/npm"
command_args="start" command_args="start"
command_user="foundkey" command_user="foundkey"
supervisor="supervise-daemon" supervisor="supervise-daemon"
supervise_daemon_args=" -d /home/foundkey/foundkey -e NODE_ENV=\"production\"" supervise_daemon_args=" -d /home/foundkey/foundkey -e NODE_ENV=\"production\""
pidfile="/run/${RC_SVCNAME}.pid" pidfile="/run/${RC_SVCNAME}.pid"
depend() { depend() {
need net need net
use logger use logger
# alternatively, uncomment if using nginx reverse proxy # alternatively, uncomment if using nginx reverse proxy
#use logger nginx #use logger nginx
} }
``` ```
2. Set the service to start on boot 2. Set the service to start on boot