瀏覽代碼

issue #119 - fix sqlite "out of memory" error under systemd

Mike 11 月之前
父節點
當前提交
17f8149f6c
共有 2 個文件被更改,包括 12 次插入11 次删除
  1. 3 1
      config/ras.service
  2. 9 10
      docs/SYSTEMD.md

+ 3 - 1
config/ras.service

@@ -5,12 +5,14 @@ Description=Retro AIM Server
 Type=simple
 User=ras
 Group=ras
+WorkingDirectory=/opt/ras
+StateDirectory=ras
 Environment="API_LISTENER=127.0.0.1:8080"
 Environment="OSCAR_ADVERTISED_LISTENERS=EXTERNAL://127.0.0.1:5190"
 Environment="OSCAR_LISTENERS=EXTERNAL://0.0.0.0:5190"
 Environment="KERBEROS_LISTENERS=EXTERNAL://0.0.0.0:1088"
 Environment="TOC_LISTENERS=0.0.0.0:9898"
-Environment="DB_PATH=/var/ras/oscar.sqlite"
+Environment="DB_PATH=/var/lib/oscar.sqlite"
 Environment="DISABLE_AUTH=true"
 Environment="LOG_LEVEL=info"
 ExecStart=/opt/ras/retro_aim_server

+ 9 - 10
docs/SYSTEMD.md

@@ -12,20 +12,19 @@ a production service.
    Run the following commands:
 
    ```shell
-   $ sudo useradd ras
-   $ sudo mkdir -p /opt/ras
-   $ sudo mkdir -p /var/ras
+   sudo useradd ras
+   sudo mkdir -p /opt/ras
    ```
 
 3. **Extract the archive**
 
-   Extract the archive using the usual `tar` invocation, and move the extracted contents into `/opt/ras`
+   Extract the archive using the usual `tar` invocation, and move `retro_aim_server` into `/opt/ras`
 
 4. **Set Ownership and Permissions**
 
    ```shell
-   $ sudo chown -R ras:ras /opt/ras
-   $ sudo chmod -R o-rx /opt/ras
+   sudo chown -R ras:ras /opt/ras
+   sudo chmod -R o-rx /opt/ras
    ```
 
 5. **Copy the systemd service**
@@ -35,20 +34,20 @@ a production service.
 6. **Reload systemd**
 
    ```shell
-   $ sudo systemctl daemon-reload
+   sudo systemctl daemon-reload
    ```
 
 7. **Enable and start the service**
 
    ```shell
-   $ sudo systemctl enable --now ras.service
+   sudo systemctl enable --now ras.service
    ```
 
 8. **Make sure the service is running**
 
    ```shell
-   $ sudo systemctl status ras.service
-   $ sudo journalctl -xeu ras.service
+   sudo systemctl status ras.service
+   sudo journalctl -xeu ras.service
    ```
 
 Note that the `systemd` service defines the configuration for Retro AIM Server directly, bypassing the `settings.env`