Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
aports
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Henrik Riomar
aports
Commits
663d500d
Commit
663d500d
authored
Dec 15, 2019
by
Jakub Jirutka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
community/stunnel: improve init script
parent
380daa93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
community/stunnel/APKBUILD
community/stunnel/APKBUILD
+2
-2
community/stunnel/stunnel.initd
community/stunnel/stunnel.initd
+18
-7
No files found.
community/stunnel/APKBUILD
View file @
663d500d
...
...
@@ -4,7 +4,7 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname
=
stunnel
pkgver
=
5.56
pkgrel
=
0
pkgrel
=
1
pkgdesc
=
"SSL encryption wrapper between network client and server"
url
=
"https://www.stunnel.org"
arch
=
"all"
...
...
@@ -49,5 +49,5 @@ package() {
}
sha512sums
=
"db1be82b80bd5606568c5565f1c9a5710d4f7abca2d89388daa441bc395aaf2be998ac6403c7a17b8af01b89ade825186c20c50f73a809f9d64eca2e1b57a877 stunnel-5.56.tar.gz
33e215413e08fdd5783cc76e6ba6a2342fb6d0573f801815c4d3022625e71be6c9739d47a7a61bf7c803f27911b9c92cf6ae3e522add040f83802e1aaeaee000
stunnel.initd
51d56a6c0d961f6de5cd2ef07a1cfdb19fb1b74300da9c340899daa919bd9b2c0bfff472f03746df0dd1aa6098c79035921ca36108ca0b93693377f1ac1c7fb4
stunnel.initd
a72bfddeb74787d58c9fd24782d86c0498ce3530a43fbdd4ec4c4b57baa6257b6ef21005aca274b22c4a22cdbbbcee63dd3d841f458af248db9c69e8d59fa56f stunnel.conf"
community/stunnel/stunnel.initd
View file @
663d500d
#!/sbin/openrc-run
instance_name="${SVCNAME#*.}"
extra_started_commands="reload reopen"
description_reload="Reload configuration file"
description_reopen="Reopen log file"
instance_name="${RC_SVCNAME#*.}"
instance_name="${instance_name:-stunnel}"
config_file="${STUNNEL_CONFIGFILE:-/etc/stunnel/$instance_name.conf}"
extra_started_commands="reload"
: ${cfgfile:=${STUNNEL_CONFIGFILE:-"/etc/stunnel/$instance_name.conf"}}
command="/usr/bin/stunnel"
command_args="$c
onfig_file $STUNNEL_OPTIONS
"
command_args="$c
fgfile $STUNNEL_OPTIONS $command_args
"
pidfile="/run/stunnel/$instance_name.pid" # default value
required_files="$c
onfig_
file"
required_files="$c
fg
file"
depend() {
...
...
@@ -41,15 +44,23 @@ stop_pre() {
reload() {
pidfile=$(config_get "pid" "$pidfile")
ebegin "Reloading $
SVCNAME
"
ebegin "Reloading $
RC_SVCNAME configuration
"
start-stop-daemon --signal HUP --pidfile "$pidfile" --name stunnel
eend $?
}
reopen() {
pidfile=$(config_get "pid" "$pidfile")
ebegin "Reopening $RC_SVCNAME log file"
start-stop-daemon --signal USR1 --pidfile "$pidfile" --name stunnel
eend $?
}
config_get() {
local key="$1"
local default="${2:-}"
local val="$(sed -En "s|^$key\s*=\s*(.*)\s*$|\1|p" "$c
onfig_
file")"
local val="$(sed -En "s|^$key\s*=\s*(.*)\s*$|\1|p" "$c
fg
file")"
echo "${val:-$default}"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment