diff --git a/central-manager/install/install.sh b/central-manager/install/install.sh index c3673f6..644685f 100755 --- a/central-manager/install/install.sh +++ b/central-manager/install/install.sh @@ -1,10 +1,21 @@ #!/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; -# [2] Create service unit +# [3] Create service unit 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; + +# [5] Create log file +sudo touch /var/log/sgca; diff --git a/central-manager/install/run_cterm.sh b/central-manager/install/run_cterm.sh deleted file mode 100755 index 0c23fd7..0000000 --- a/central-manager/install/run_cterm.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo -ne "\x3\x0\x0" | nc -u localhost 4446; diff --git a/central-manager/install/run_plane_request.sh b/central-manager/install/run_plane_request.sh deleted file mode 100755 index b3bc3f1..0000000 --- a/central-manager/install/run_plane_request.sh +++ /dev/null @@ -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; diff --git a/central-manager/install/run_vterm.sh b/central-manager/install/run_vterm.sh deleted file mode 100755 index efdef99..0000000 --- a/central-manager/install/run_vterm.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo -ne "\x3\x0\x0" | nc -u localhost 4445; diff --git a/central-manager/install/sgca b/central-manager/install/sgca deleted file mode 100755 index da60884..0000000 --- a/central-manager/install/sgca +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -/home/xdrm-brackets/Desktop/git.xdrm.io/sysdis-project/central-manager/boot >> $1 2>&1; \ No newline at end of file diff --git a/central-manager/install/sgca.service b/central-manager/install/sgca.service index c2a0579..8be41b5 100644 --- a/central-manager/install/sgca.service +++ b/central-manager/install/sgca.service @@ -5,6 +5,6 @@ Requires=network.target [Service] Type=simple -User=xdrm-brackets -Group=xdrm-brackets -ExecStart=/usr/sbin/sgca /var/log/sgca \ No newline at end of file +User=root +Group=root +ExecStart=/usr/sbin/sgca diff --git a/central-manager/install/uninstall.sh b/central-manager/install/uninstall.sh index c3a2850..f6628b2 100755 --- a/central-manager/install/uninstall.sh +++ b/central-manager/install/uninstall.sh @@ -4,8 +4,12 @@ sudo rm /usr/sbin/sgca; # [2] Disable service +sudo systemctl stop sgca.service; sudo systemctl disable sgca.service; # [3] Remove service unit sudo rm /lib/systemd/system/sgca.service; +# [4] Remove log file +sudo rm /var/log/sgca; +