From 7c9d75c5b066726885b9b7af186f5fae73cc4ccd Mon Sep 17 00:00:00 2001 From: asandikci Date: Sat, 29 Jul 2023 14:59:14 +0300 Subject: [PATCH] Saturday - Last Commit --- README.md | 4 ++-- go-daemon/godaemon1.go | 1 - go-daemon/godaemon1.service | 2 -- go-daemon/install.sh | 4 ---- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4f1f367..1d44d2b 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Install latest version of Go ! Build / Install with: ```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: ```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 ``` diff --git a/go-daemon/godaemon1.go b/go-daemon/godaemon1.go index 1cd10e9..2096eb1 100644 --- a/go-daemon/godaemon1.go +++ b/go-daemon/godaemon1.go @@ -15,7 +15,6 @@ func main() { LogFilePerm: 0640, WorkDir: "./", Umask: 027, - // Args: []string{"[go-daemon godaemon1]"}, } d, err := cntxt.Reborn() diff --git a/go-daemon/godaemon1.service b/go-daemon/godaemon1.service index f8c7d74..c321bd3 100644 --- a/go-daemon/godaemon1.service +++ b/go-daemon/godaemon1.service @@ -12,8 +12,6 @@ PIDFile=/run/godaemon1.pid PrivateTmp=false Restart=always -WorkDir=/etc/godaemon/ - [Install] WantedBy=multi-user.target Alias=godaemon1.service \ No newline at end of file diff --git a/go-daemon/install.sh b/go-daemon/install.sh index e021136..9e81345 100644 --- a/go-daemon/install.sh +++ b/go-daemon/install.sh @@ -3,13 +3,10 @@ ### godaemon1 # Pre-Cleaning sudo rm /usr/bin/godaemon1 -sudo rm -rf /etc/godaemon1/ sudo killall godaemon1 sudo systemctl disable godaemon1 sudo systemctl stop godaemon1 sudo systemctl daemon-reload -sudo rm /godaemon1.log /godaemon1.pid -sudo rm /etc/godaemon1/godaemon1.log /etc/godaemon1/godaemon1.pid # Building temp_dir="$(mktemp -d)" @@ -21,7 +18,6 @@ go build -o ./bin/ # Installing sudo mv ./bin/godaemon1 /usr/bin/godaemon1 -sudo mkdir -p /etc/godaemon1/ if [[ $(ps -jp 1 | awk 'FNR == 2 {print $6}') == "systemd" ]] then sudo mv ./godaemon1.service /etc/systemd/system/