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
e85f3810
Commit
e85f3810
authored
Aug 05, 2011
by
Jeff Bilyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-sshd: cleanups and add command line options
parent
b75c7351
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
setup-sshd.in
setup-sshd.in
+19
-10
No files found.
setup-sshd.in
View file @
e85f3810
...
...
@@ -6,39 +6,48 @@ PREFIX=
usage
()
{
cat
<<
__EOF__
usage: setup-sshd [-h
np
]
usage: setup-sshd [-h
] [-c choice of SSH daemon
]
Setup sshd
Setup sshd
daemon
options:
-h Show this help
-c Choice of SSH daemon: openssh dropbear none
__EOF__
exit
1
}
while
getopts
"h
n
"
opt
;
do
while
getopts
"h
c:
"
opt
;
do
case
$opt
in
h
)
usage
;;
c
)
sshdchoice
=
"
$OPTARG
"
;;
esac
done
echo
"Sshd to setup? (openssh, dropbear, none) [openssh]"
default_read setupsshd
"openssh"
if
[
"
$setupsshd
"
=
"none"
]
;
then
if
[
"
$sshdchoice
"
=
""
]
;
then
echo
"sshd to setup? (openssh, dropbear, none) [openssh]"
default_read sshdchoice
"openssh"
fi
if
[
"
$sshdchoice
"
=
"none"
]
;
then
exit
0
fi
acfinstalled
=
"
`
apk version acf-core
-q
|
awk
'{print $1}'
`
"
if
[
"
setupsshd"
=
"openssh"
]
;
then
if
[
"
$sshdchoice
"
=
"openssh"
]
;
then
if
[
"
$acfinstalled
"
!=
"ERROR:"
]
;
then
apk add acf-openssh
-q
else
apk add openssh
-q
fi
elif
[
"
setupsshd"
=
"dropbear"
]
;
then
elif
[
"
$sshdchoice
"
=
"dropbear"
]
;
then
apk add dropbear
fi
/etc/init.d/sshd start
rc-update add sshd default
if
[
-e
/etc/init.d/sshd
]
;
then
/etc/init.d/sshd start
rc-update add sshd default
else
echo
"
$sshdchoice
failed to install"
fi
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