Saturday - Last Commit
This commit is contained in:
parent
65f620907a
commit
7c9d75c5b0
4 changed files with 2 additions and 9 deletions
|
@ -28,7 +28,7 @@ Install latest version of Go !
|
||||||
|
|
||||||
Build / Install with:
|
Build / Install with:
|
||||||
```bash
|
```bash
|
||||||
wget -qO- https://git.aliberksandikci.com.tr/Liderahenk/go-daemon/raw/branch/main/go-daemon/install.sh | sh
|
wget -qO- https://git.aliberksandikci.com.tr/Liderahenk/go-daemon/raw/branch/main/go-daemon/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ sudo apt install git golang-go gcc
|
||||||
|
|
||||||
Build / Install with:
|
Build / Install with:
|
||||||
```bash
|
```bash
|
||||||
wget -qO- https://git.aliberksandikci.com.tr/Liderahenk/go-daemon/raw/branch/main/c-daemon/tmp-install.sh | sh
|
wget -qO- https://git.aliberksandikci.com.tr/Liderahenk/go-daemon/raw/branch/main/c-daemon/tmp-install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ func main() {
|
||||||
LogFilePerm: 0640,
|
LogFilePerm: 0640,
|
||||||
WorkDir: "./",
|
WorkDir: "./",
|
||||||
Umask: 027,
|
Umask: 027,
|
||||||
// Args: []string{"[go-daemon godaemon1]"},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
d, err := cntxt.Reborn()
|
d, err := cntxt.Reborn()
|
||||||
|
|
|
@ -12,8 +12,6 @@ PIDFile=/run/godaemon1.pid
|
||||||
PrivateTmp=false
|
PrivateTmp=false
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
WorkDir=/etc/godaemon/
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
Alias=godaemon1.service
|
Alias=godaemon1.service
|
|
@ -3,13 +3,10 @@
|
||||||
### godaemon1
|
### godaemon1
|
||||||
# Pre-Cleaning
|
# Pre-Cleaning
|
||||||
sudo rm /usr/bin/godaemon1
|
sudo rm /usr/bin/godaemon1
|
||||||
sudo rm -rf /etc/godaemon1/
|
|
||||||
sudo killall godaemon1
|
sudo killall godaemon1
|
||||||
sudo systemctl disable godaemon1
|
sudo systemctl disable godaemon1
|
||||||
sudo systemctl stop godaemon1
|
sudo systemctl stop godaemon1
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo rm /godaemon1.log /godaemon1.pid
|
|
||||||
sudo rm /etc/godaemon1/godaemon1.log /etc/godaemon1/godaemon1.pid
|
|
||||||
|
|
||||||
# Building
|
# Building
|
||||||
temp_dir="$(mktemp -d)"
|
temp_dir="$(mktemp -d)"
|
||||||
|
@ -21,7 +18,6 @@ go build -o ./bin/
|
||||||
|
|
||||||
# Installing
|
# Installing
|
||||||
sudo mv ./bin/godaemon1 /usr/bin/godaemon1
|
sudo mv ./bin/godaemon1 /usr/bin/godaemon1
|
||||||
sudo mkdir -p /etc/godaemon1/
|
|
||||||
if [[ $(ps -jp 1 | awk 'FNR == 2 {print $6}') == "systemd" ]]
|
if [[ $(ps -jp 1 | awk 'FNR == 2 {print $6}') == "systemd" ]]
|
||||||
then
|
then
|
||||||
sudo mv ./godaemon1.service /etc/systemd/system/
|
sudo mv ./godaemon1.service /etc/systemd/system/
|
||||||
|
|
Loading…
Reference in a new issue