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
2741f5af
Commit
2741f5af
authored
Aug 19, 2009
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-webconf: create admin user by default
parent
7ba8c4c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
setup-webconf.in
setup-webconf.in
+14
-2
No files found.
setup-webconf.in
View file @
2741f5af
...
...
@@ -7,17 +7,18 @@ PREFIX=
.
$PREFIX
/lib/libalpine.sh
usage
()
{
echo
"
$PROGRAM
[-ah] [-l address] [PACKAGE...]"
echo
"
$PROGRAM
[-ah
n
] [-l address] [PACKAGE...]"
exit
0
;
}
pkgs
=
"acf-core acf-alpine-baselayout acf-apk-tools"
while
getopts
"ahl:"
opt
;
do
while
getopts
"ahl:
n
"
opt
;
do
case
$opt
in
a
)
pkgs
=
`
apk_fetch
-l
|
grep
^acf-
`
;;
h
)
usage
;;
l
)
address
=
"
$OPTARG
"
;;
n
)
create_passwd
=
no
;;
*
)
usage
;;
esac
done
...
...
@@ -28,6 +29,17 @@ while [ $# -gt 0 ]; do
shift
done
if
[
"
$create_passwd
"
!=
"no"
]
;
then
askpassword
"root ACF"
if
[
-f
/etc/acf/passwd
]
;
then
mv
/etc/acf/passwd /etc/acf/passwd.backup
fi
# this will show password on process list but we assume user is alone
# on the box at this stage
_md5passwd
=
$(
echo
-n
"
$_password
"
|
md5sum
)
echo
"root:
$_md5passwd
:Admin account:ADMIN"
>
/etc/acf/passwd
fi
# install packages
apk_add mini_httpd
$pkgs
||
exit
1
...
...
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