From e8dec2fbef8b0cc99b547c856c230685e7cf473a Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 20 Jun 2024 03:03:11 +0000 Subject: [PATCH] add Makefile, move systemd service file to init folder --- Makefile | 9 +++++++++ init/proxmoxaas-ldap.service | 11 +++++++++++ service/proxmoxaas-ldap.service | 11 ----------- 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 Makefile create mode 100644 init/proxmoxaas-ldap.service delete mode 100644 service/proxmoxaas-ldap.service diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ec7cbb6 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +build: clean + go build -ldflags="-s -w" -o dist/ . + +test: clean + go run . + +clean: + go clean + rm -f dist/* \ No newline at end of file diff --git a/init/proxmoxaas-ldap.service b/init/proxmoxaas-ldap.service new file mode 100644 index 0000000..69b8d8c --- /dev/null +++ b/init/proxmoxaas-ldap.service @@ -0,0 +1,11 @@ +[Unit] +Description=proxmoxaas-ldap +After=network.target +[Service] +WorkingDirectory=/ +ExecStart=//proxmoxaas-ldap +Restart=always +RestartSec=10 +Type=simple +[Install] +WantedBy=default.target \ No newline at end of file diff --git a/service/proxmoxaas-ldap.service b/service/proxmoxaas-ldap.service deleted file mode 100644 index d875bd0..0000000 --- a/service/proxmoxaas-ldap.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=proxmoxaas-ldap -After=network.target -[Service] -WorkingDirectory=//ProxmoxAAS-LDAP/ -ExecStart=//ProxmoxAAS-LDAP/start.sh -Restart=always -RestartSec=10 -Type=simple -[Install] -WantedBy=default.target \ No newline at end of file