2017-04-06 18:08:45 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-05-05 12:33:58 +00:00
|
|
|
# [1] Create script file
|
|
|
|
cd `pwd`/..;
|
|
|
|
make all;
|
|
|
|
cp boot install/sgca;
|
|
|
|
make clean;
|
|
|
|
cd install;
|
|
|
|
|
|
|
|
|
|
|
|
# [2] Create service target (boot)
|
2017-04-06 18:08:45 +00:00
|
|
|
sudo ln -s $(pwd)/sgca /usr/sbin/sgca;
|
|
|
|
|
2017-05-05 12:33:58 +00:00
|
|
|
# [3] Create service unit
|
2017-04-06 18:08:45 +00:00
|
|
|
sudo ln -s $(pwd)/sgca.service /lib/systemd/system/sgca.service;
|
|
|
|
|
2017-05-05 12:33:58 +00:00
|
|
|
# [4] Enable service (optional if no [Install])
|
2017-04-06 18:08:45 +00:00
|
|
|
sudo systemctl enable sgca.service;
|
2017-05-05 12:33:58 +00:00
|
|
|
|
|
|
|
# [5] Create log file
|
|
|
|
sudo touch /var/log/sgca;
|