add Makefile, move systemd service file to init folder

This commit is contained in:
Arthur Lu 2024-06-20 03:03:11 +00:00
parent df2d5f0bf7
commit e8dec2fbef
3 changed files with 20 additions and 11 deletions

9
Makefile Normal file
View File

@ -0,0 +1,9 @@
build: clean
go build -ldflags="-s -w" -o dist/ .
test: clean
go run .
clean:
go clean
rm -f dist/*

View File

@ -0,0 +1,11 @@
[Unit]
Description=proxmoxaas-ldap
After=network.target
[Service]
WorkingDirectory=/<path to dir>
ExecStart=/<path to dir>/proxmoxaas-ldap
Restart=always
RestartSec=10
Type=simple
[Install]
WantedBy=default.target

View File

@ -1,11 +0,0 @@
[Unit]
Description=proxmoxaas-ldap
After=network.target
[Service]
WorkingDirectory=/<path to dir>/ProxmoxAAS-LDAP/
ExecStart=/<path to dir>/ProxmoxAAS-LDAP/start.sh
Restart=always
RestartSec=10
Type=simple
[Install]
WantedBy=default.target