-
Notifications
You must be signed in to change notification settings - Fork 15
Data Service As Systemd
Maxime Landon edited this page Feb 25, 2020
·
4 revisions
The Data Service can be run as a Systemd daemon.
The Unit file for the C2 server is at the root of the repo (if you cloned it) as wiregost-data.service.
The content is the following (that you can just copy/paste of course):
[Unit]
Description=Wiregost Data Service
ConditionPathExists=$PATH_TO_DATA_SERVICE_BINARY
After=network.target
[Service]
Type=simple
User=$USER
Group=$GROUP
LimitNOFILE=1024
# Run Management
Restart=on-failure
RestartSec=10
startLimitIntervalSec=60
# File paths
WorkingDirectory=$PATH_TO_REPO
ExecStart=$PATH_TO_DATA_SERVICE_BINARY --name=wiregost
[Install]
WantedBy=multi-user.target
The following fields should be changed/set:
- $USER: the user name you want to run the Data Service with
- $GROUP: the group name you want to run the Data Service with
- $PATH_TO_DATA_SERVICE_BINARY: The path to the Data Service executable
- $PATH_TO_REPO: The path the Wiregost repo (if you cloned it), or wherever you want if you use either the statically-compiled Data Service or one of the binary releases
Then copy the Unit file to /usr/lib/systemd/system/ directory (for Arch Linux at least, check for you distribution)
Then you can use the classics:
systemctl start wiregost-data.service
or
systemctl enable wiregost-data.service
You can check logs from Wiregost by using the following command:
journalctl -f -u wiregost-data.service