Skip to content

Commit 4c4f27f

Browse files
committed
deb rmp add systemd config
1 parent 4d920ca commit 4c4f27f

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

.goreleaser.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ nfpms:
7373
formats:
7474
- deb
7575
- rpm
76+
scripts:
77+
preinstall: "scripts/install_remove/preinstall.sh"
78+
postinstall: "scripts/install_remove/postinstall.sh"
79+
preremove: "scripts/install_remove/preremove.sh"
80+
postremove: "scripts/install_remove/postremove.sh"
7681
files:
7782
"systemd/**": "/etc/systemd/system"
7883
config_files:

scripts/install_remove/postinstall.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
echo postinstall.sh
4+
systemctl enable server-go
5+
systemctl start server-go

scripts/install_remove/postremove.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
echo postremove.sh
4+
#rm -rf /etc/server-go

scripts/install_remove/preinstall.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
echo preinstall.sh:
4+
#systemctl stop server-go
5+
#systemctl disable server-go

scripts/install_remove/preremove.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
echo preremove.sh:
4+
systemctl stop server-go
5+
systemctl disable server-go

0 commit comments

Comments
 (0)