Skip to content

Commit

Permalink
some suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
PurnenduMIshra129th committed Dec 29, 2024
1 parent 42af787 commit f20cdc9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions example/linux/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This guide provides step-by-step instructions for setting up the Talawa API serv

### 1. Create a Dedicated System User

- Create a user named `talawa` for running the service:
- Create a user named `talawa` for running the service(Don't confuse between `talawa` is user name and `talawa-api`is directory):
```bash
sudo adduser --system --no-create-home --group talawa
```
Expand Down Expand Up @@ -157,4 +157,4 @@ This guide provides step-by-step instructions for setting up the Talawa API serv
```bash
sudo systemctl status mongod
sudo systemctl status redis
```
```
4 changes: 2 additions & 2 deletions example/linux/systemd/Talawa-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PROD_PATH="dist/index.js"
# Check if the log file exists
if [ ! -f "$LOG_FILE" ]; then
echo "Error: Log file '$LOG_FILE' not found. Exiting."
echo "Please create it first with the correct ownership and permissions, then rerurn."
echo "Please create it first with the correct ownership and permissions, then return."
exit 1
fi

Expand Down Expand Up @@ -84,7 +84,7 @@ echo "Installed Node.js version: $INSTALLED_NODE_VERSION" | tee -a "$LOG_FILE"
echo "Target Node.js version: $TARGET_NODE_VERSION" | tee -a "$LOG_FILE"

if [ "$INSTALLED_NODE_VERSION" != "$TARGET_NODE_VERSION" ]; then
echo "Error: Node.js version mismatch. Found $INSTALLED_NODE_VERSION, need $TARGET_NODE_VERSION". Exiting.| tee -a "$LOG_FILE"
echo "Error: Node.js version mismatch. Found $INSTALLED_NODE_VERSION, need $TARGET_NODE_VERSION". Exiting. | tee -a "$LOG_FILE"
echo "First install the required Node.js version from package.json in system then proceed further. It should match system Node.js version and Talawa-api Node.js version v$TARGET_NODE_VERSION" | tee -a "$LOG_FILE"
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion example/linux/systemd/talawa-api.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ After=network.target
Type=simple

# The command to start the service. This points to the Talawa-api.sh script.Here you can't use TALAWA_API_HOME from shell (~/.bashrc) as systemd will not load any variable. That's why we have to manually add it.Always use absolute path.
ExecStart="/path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh"
ExecStart=/path/to/your/talawa-api/example/linux/systemd/Talawa-api.sh

# The working directory for the service.User have to export it.
WorkingDirectory=/path/to/your/talawa-api
Expand Down

0 comments on commit f20cdc9

Please sign in to comment.