parent
265feabb59
commit
486216f183
|
@ -1,10 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# [1] Create service target (boot)
|
# [1] Create script file
|
||||||
|
cd `pwd`/..;
|
||||||
|
make all;
|
||||||
|
cp boot install/sgca;
|
||||||
|
make clean;
|
||||||
|
cd install;
|
||||||
|
|
||||||
|
|
||||||
|
# [2] Create service target (boot)
|
||||||
sudo ln -s $(pwd)/sgca /usr/sbin/sgca;
|
sudo ln -s $(pwd)/sgca /usr/sbin/sgca;
|
||||||
|
|
||||||
# [2] Create service unit
|
# [3] Create service unit
|
||||||
sudo ln -s $(pwd)/sgca.service /lib/systemd/system/sgca.service;
|
sudo ln -s $(pwd)/sgca.service /lib/systemd/system/sgca.service;
|
||||||
|
|
||||||
# [3] Enable service (optional if no [Install])
|
# [4] Enable service (optional if no [Install])
|
||||||
sudo systemctl enable sgca.service;
|
sudo systemctl enable sgca.service;
|
||||||
|
|
||||||
|
# [5] Create log file
|
||||||
|
sudo touch /var/log/sgca;
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo -ne "\x3\x0\x0" | nc -u localhost 4446;
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo -ne "abcdef\x1\x0\x0\x0\x2\x0\x0\x0\x3\x0\x0\x0\x4\x0\x0\x0\x5\x0\x0\x0" | nc localhost 20556;
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo -ne "\x3\x0\x0" | nc -u localhost 4445;
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
/home/xdrm-brackets/Desktop/git.xdrm.io/sysdis-project/central-manager/boot >> $1 2>&1;
|
|
|
@ -5,6 +5,6 @@ Requires=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=xdrm-brackets
|
User=root
|
||||||
Group=xdrm-brackets
|
Group=root
|
||||||
ExecStart=/usr/sbin/sgca /var/log/sgca
|
ExecStart=/usr/sbin/sgca
|
||||||
|
|
|
@ -4,8 +4,12 @@
|
||||||
sudo rm /usr/sbin/sgca;
|
sudo rm /usr/sbin/sgca;
|
||||||
|
|
||||||
# [2] Disable service
|
# [2] Disable service
|
||||||
|
sudo systemctl stop sgca.service;
|
||||||
sudo systemctl disable sgca.service;
|
sudo systemctl disable sgca.service;
|
||||||
|
|
||||||
# [3] Remove service unit
|
# [3] Remove service unit
|
||||||
sudo rm /lib/systemd/system/sgca.service;
|
sudo rm /lib/systemd/system/sgca.service;
|
||||||
|
|
||||||
|
# [4] Remove log file
|
||||||
|
sudo rm /var/log/sgca;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue