mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Updated systemd unit file and added sample configuration file
Rewrote the systemd unit file to fix an issue where the system was not able to create a PID file inside /var/run. I fixed this by having systemd create a new directory called /var/run/gns3. Then I had systemd change ownership of the directory to gns3:gns3 so the gns3server executable could read and write the PID file. I have tested these changes against Ubuntu 16.04.1 LTS.
This commit is contained in:
1 parent
d447a04c6a
commit
763f258465
2 files changed
+77
-14
No files matched your search
+16
-14
@@ -1,14 +1,16 @@
|
||||
[Unit]
|
||||
Description=GNS3 server
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
Environment=statedir=/var/cache/gns3
|
||||
PIDFile=/var/run/gns3.pid
|
||||
ExecStart=/usr/local/bin/gns3server --log /var/log/gns3.log \
|
||||
--pid /var/run/gns3.pid --daemon
|
||||
Restart=on-abort
|
||||
User=gns3
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
[Unit]
|
||||
Description=GNS3 server
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
User=gns3
|
||||
Group=gns3
|
||||
PermissionsStartOnly=true
|
||||
ExecStartPre=/bin/mkdir /var/run/gns3
|
||||
ExecStartPre=/bin/chown -R gns3:gns3 /var/run/gns3/
|
||||
ExecStart=/usr/share/gns3/gns3-server/bin/gns3server --log /var/log/gns3/gns3.log --pid /var/run/gns3/gns3.pid --daemon
|
||||
Restart=on-abort
|
||||
PIDFile=/var/run/gns3/gns3-server.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in new issue
Block a user