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
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
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
alpine
alpine-conf
Commits
e73092f0
Commit
e73092f0
authored
Apr 06, 2007
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added setup-mta and setup-problem-reporting
parent
b183abaa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
5 deletions
+98
-5
Makefile
Makefile
+7
-5
setup-mta
setup-mta
+51
-0
setup-problem-reporting
setup-problem-reporting
+40
-0
No files found.
Makefile
View file @
e73092f0
V
=
0.8_beta
3
V
=
0.8_beta
6
P
=
alpine-conf
PV
=
$(P)
-
$(V)
APKF
=
$(PV)
.apk
...
...
@@ -8,13 +8,15 @@ TMP=$(PV)
LIB_FILES
=
libalpine.sh
SBIN_FILES
=
lbu
\
setup-interfaces
\
setup-ads
\
setup-alpine
\
setup-cryptswap
\
setup-dns
\
setup-hostname
\
setup-alpine
\
setup-interfaces
\
setup-mta
\
setup-problem-reporting
\
setup-webconf
\
setup-cryptswap
\
setup-ads
\
update-conf
EXTRA_DIST
=
Makefile README
...
...
setup-mta
0 → 100755
View file @
e73092f0
#!/bin/sh
PREFIX
=
.
"
$PREFIX
/lib/libalpine.sh"
conf
=
"
$ROOT
/etc/ssmtp/ssmtp.conf"
cfgval
()
{
awk
-F
=
"/^
$1
/ {print
\$
2}"
$conf
2>/dev/null
}
setcfg
()
{
local
key
=
$1
local
value
=
$2
sed
-i
"s/^
\\
(
\\
#
\\
)*
$key
=.*/
$key
=
$value
/"
"
$conf
"
if
!
grep
"^
$key
="
"
$conf
"
>
/dev/null
;
then
echo
"
$key
=
$value
"
>>
"
$conf
"
fi
}
if
[
-f
"
$conf
"
]
;
then
mailhub
=
$(
cfgval mailhub
)
fi
domain
=
$(
hostname
-d
$hostname
2>/dev/null
)
if
[
-z
"
$mailhub
"
]
;
then
if
[
-n
"
$domain
"
]
;
then
mailhub
=
"smtp.
$domain
"
else
mailhub
=
smtp
fi
fi
res
=
while
[
"
$res
"
!=
"221"
]
;
do
echon
"Outgoing mail server? (e.g 'smtp.isp.com') [
$mailhub
] "
default_read mailhub
$mailhub
echon
"Test connection? (y/n) [y] "
default_read testconn
"y"
case
"
$testconn
"
in
[
Nn]
*
)
break
;;
esac
res
=
$(
echo
-e
"quit
\r\n
"
| nc
$mailhub
25 |
awk
'/^221/ {print $1}'
)
[
"x
$res
"
=
"x221"
]
&&
echo
"Connection to
$mailhub
is ok."
done
apk_add ssmtp
setcfg mailhub
$mailhub
setcfg FromLineOverride YES
setup-problem-reporting
0 → 100755
View file @
e73092f0
#!/bin/sh
PREFIX
=
.
"
$PREFIX
/lib/libalpine.sh"
conf
=
"
$ROOT
/etc/gnats/send-pr.conf"
cfgval
()
{
awk
-F
=
"/^
$1
/ {print
\$
2}"
"
$ROOT
/etc/ssmtp/ssmtp.conf"
2>/dev/null
}
email
=
$(
awk
-F
=
'/^FROM/ {print $2}'
"
$conf
"
2>/dev/null
)
if
[
-z
"
$email
"
]
;
then
hostname
=
$(
cfgval
hostname
)
if
[
-z
"
$hostname
"
]
;
then
hostname
=
$(
hostname
-f
2>/dev/null
||
cat
/etc/hostname
)
fi
else
hostname
=
$(
hostname
-f
2>/dev/null
||
cat
/etc/hostname
)
fi
domain
=
$(
hostname
-d
$hostname
2>/dev/null
)
if
[
-n
"
$hostname
"
-a
-z
"
$email
"
]
;
then
email
=
$(
whoami
)
@
$hostname
fi
echon
"Sender email address for problem reports? [
$email
] "
default_read email
$email
if
grep
^FROM
"
$conf
"
>
/dev/null
;
then
sed
-i
"s/FROM.*/FROM=
$email
/"
"
$conf
"
else
echo
"FROM=
$email
"
>>
"
$conf
"
fi
setup-mta
echo
""
echo
"Please run 'send-pr' to submit problem reports"
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