Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Ntfy_archive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Ntfy_archive
Commits
069d6626
Commit
069d6626
authored
3 years ago
by
Philipp Heckel
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' into docs
parents
90ba3413
6fbbb0c7
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.goreleaser.yml
+2
-0
2 additions, 0 deletions
.goreleaser.yml
scripts/postinst.sh
+19
-0
19 additions, 0 deletions
scripts/postinst.sh
scripts/postrm.sh
+5
-3
5 additions, 3 deletions
scripts/postrm.sh
scripts/prerm.sh
+12
-0
12 additions, 0 deletions
scripts/prerm.sh
with
38 additions
and
3 deletions
.goreleaser.yml
+
2
−
0
View file @
069d6626
...
@@ -53,6 +53,8 @@ nfpms:
...
@@ -53,6 +53,8 @@ nfpms:
-
src
:
config/ntfy.service
-
src
:
config/ntfy.service
dst
:
/lib/systemd/system/ntfy.service
dst
:
/lib/systemd/system/ntfy.service
scripts
:
scripts
:
postinstall
:
"
scripts/postinst.sh"
preremove
:
"
scripts/prerm.sh"
postremove
:
"
scripts/postrm.sh"
postremove
:
"
scripts/postrm.sh"
archives
:
archives
:
-
-
...
...
This diff is collapsed.
Click to expand it.
scripts/postinst.sh
0 → 100755
+
19
−
0
View file @
069d6626
#!/bin/sh
set
-e
# Restart systemd service if it was already running. Note that "deb-systemd-invoke try-restart" will
# only act if the service is already running. If it's not running, it's a no-op.
#
# TODO: This is only tested on Debian.
#
if
[
"
$1
"
=
"configure"
]
&&
[
-d
/run/systemd/system
]
;
then
systemctl
--system
daemon-reload
>
/dev/null
||
true
if
systemctl is-active
-q
ntfy.service
;
then
echo
"Restarting ntfy.service ..."
if
[
-x
/usr/bin/deb-systemd-invoke
]
;
then
deb-systemd-invoke try-restart ntfy.service
>
/dev/null
||
true
else
systemctl restart ntfy.service
>
/dev/null
||
true
fi
fi
fi
This diff is collapsed.
Click to expand it.
scripts/postrm.sh
+
5
−
3
View file @
069d6626
#!/bin/sh
#!/bin/sh
set
-eu
set
-e
systemctl stop ntfy
>
/dev/null 2>&1
||
true
# Delete the config if package is purged
if
[
"
$1
"
=
"purge"
]
;
then
if
[
"
$1
"
=
"purge"
]
;
then
rm
-rf
/etc/ntfy
echo
"Deleting /etc/ntfy ..."
rm
-rf
/etc/ntfy
||
true
fi
fi
This diff is collapsed.
Click to expand it.
scripts/prerm.sh
0 → 100755
+
12
−
0
View file @
069d6626
#!/bin/sh
set
-e
# Stop systemd service
if
[
-d
/run/systemd/system
]
&&
[
"
$1
"
=
remove
]
;
then
echo
"Stopping ntfy.service ..."
if
[
-x
/usr/bin/deb-systemd-invoke
]
;
then
deb-systemd-invoke stop
'ntfy.service'
>
/dev/null
||
true
else
systemctl stop ntfy
>
/dev/null 2>&1
||
true
fi
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment