From ae93eaea96be298e28d14e7c0b4140e338b088b2 Mon Sep 17 00:00:00 2001 From: kekskurse Date: Tue, 6 Dec 2022 12:19:14 +0100 Subject: [PATCH] Debian Packages --- .goreleaser.yml | 4 +++- data/gitea-page.service | 16 ++++++++++++++++ scripts/postinstall.sh | 8 ++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 data/gitea-page.service create mode 100644 scripts/postinstall.sh diff --git a/.goreleaser.yml b/.goreleaser.yml index b78a55e..8334562 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -23,7 +23,7 @@ nfpms: id: "gitea-page" package_name: "gitea-page" homepage: "https://www.keks.cloud" - maintainer: "git@kes.cloud" + maintainer: "git@keks.cloud" description: "Make something like github pages, that each project can have a branch wich a webpage can be delivered via a promote server (without docker things)." formats: - deb @@ -36,6 +36,8 @@ nfpms: dst: /etc/gitea-page/nginx-config-template.txt.example - src: data/info.txt dst: /var/gite-page + scripts: + postinstall: "scripts/postinstall.sh" changelog: sort: asc filters: diff --git a/data/gitea-page.service b/data/gitea-page.service new file mode 100644 index 0000000..c5b887e --- /dev/null +++ b/data/gitea-page.service @@ -0,0 +1,16 @@ +[Unit] +Description=Gitea PAge +After=syslog.target + +[Service] +Type=simple +User=gomailadmin +ExecStart=/usr/local/bin/gitea-page +SyslogIdentifier=gitea-page +StandardOutput=syslog +StandardError=syslog +Restart=always +RestartSec=3 + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh new file mode 100644 index 0000000..a743142 --- /dev/null +++ b/scripts/postinstall.sh @@ -0,0 +1,8 @@ +#/bin/sh +FILE=/etc/gitea-page/config.yml +if [ -f "$FILE" ]; then + systemctl daemon-reload + systemctl restart go-mail-admin +else + cp /etc/gitea-page/config.yml.example /etc/gitea-page/config.yml +fi \ No newline at end of file