Skip to content

Commit 76f037d

Browse files
authored
Update README.md
1 parent f08115e commit 76f037d

File tree

1 file changed

+31
-13
lines changed

1 file changed

+31
-13
lines changed

README.md

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,7 @@ sudo ufw enable
297297
sudo ufw status
298298
```
299299

300-
## A.7. Install PM2
301-
```
302-
sudo npm install -g pm2
303-
```
304-
305-
## A.8. Clone the project
300+
## A.7. Clone the project
306301
- Install `git`
307302
```
308303
sudo apt install git
@@ -634,7 +629,7 @@ VITE_NODE_NAME='YOUR_NODE_NAME'
634629

635630
# D. Build and Execute
636631
## D.1. Build the System
637-
To automate the setup and build processes for both the backend and frontend applications, run the `initial_setup.sh` script located in the root directory of the project. This script will handle building both the backend and frontend applications and configuring PM2 services automatically.
632+
To automate the setup and build processes for both the backend and frontend applications, run the `initial_setup.sh` script located in the root directory of the project. This script will handle building both the backend and frontend applications and configuring systemctl services automatically.
638633
```
639634
cd /home/iot-server/
640635
sudo chmod +x initial_setup.sh
@@ -703,12 +698,35 @@ mv source target
703698
# delete a directory or file
704699
rm -rf directoryName
705700
706-
pm2 list # Show running processes
707-
pm2 show my-app # Show details of a specific process
708-
pm2 stop my-app # Stop a process
709-
pm2 restart my-app # Restart a process
710-
pm2 delete my-app # Remove a process from PM2
711-
pm2 logs # Show logs of all processes
701+
# View logs for a specific service (last 1 minute):
702+
sudo journalctl -u fides.backend.service --no-pager --since "1 minute ago"
703+
704+
# View the latest logs for a service:
705+
sudo journalctl -u fides.backend.service -f
706+
707+
# Show logs for a service since a specific time:
708+
sudo journalctl -u fides.backend.service --since "2025-06-08 10:00:00"
709+
710+
# Show logs for all systemd services:
711+
sudo journalctl -xe
712+
713+
# Check the status of a service:
714+
systemctl status fides.backend.service
715+
716+
# Restart a service:
717+
sudo systemctl restart fides.backend.service
718+
719+
# Stop a service:
720+
sudo systemctl stop fides.backend.service
721+
722+
# Enable a service to start on boot:
723+
sudo systemctl enable fides.backend.service
724+
725+
# Disable a service from starting on boot:
726+
sudo systemctl disable fides.backend.service
727+
728+
# List all active systemd services:
729+
systemctl list-units --type=service
712730
```
713731
## E.4. Web App Ports
714732
- Change the Panel Web App Port

0 commit comments

Comments
 (0)