Allow to set HDD password via command line
This commit is contained in:
parent
5919719f3e
commit
76220d811d
@ -10,5 +10,6 @@ cd $(realpath $(dirname "${0}"))
|
|||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
# Remove root settings
|
# Remove root settings
|
||||||
find /root -mindepth 1 -maxdepth 1 | xargs rm -rf
|
find /root -mindepth 1 -maxdepth 1 | xargs rm -rf
|
||||||
# Change root password
|
# Change passwords
|
||||||
|
vmmgr change-password
|
||||||
passwd
|
passwd
|
||||||
|
@ -14,6 +14,9 @@ subparsers = parser.add_subparsers()
|
|||||||
parser_install = subparsers.add_parser('install')
|
parser_install = subparsers.add_parser('install')
|
||||||
parser_install.set_defaults(action='install')
|
parser_install.set_defaults(action='install')
|
||||||
|
|
||||||
|
parser_change_password = subparsers.add_parser('change-password')
|
||||||
|
parser_change_password.set_defaults(action='change-password')
|
||||||
|
|
||||||
parser_update_login = subparsers.add_parser('update-login')
|
parser_update_login = subparsers.add_parser('update-login')
|
||||||
parser_update_login.set_defaults(action='update-login')
|
parser_update_login.set_defaults(action='update-login')
|
||||||
parser_update_login.add_argument('app', help='Application name')
|
parser_update_login.add_argument('app', help='Application name')
|
||||||
@ -49,6 +52,11 @@ if args.action == 'install':
|
|||||||
# Used during VM installation
|
# Used during VM installation
|
||||||
mgr.rebuild_nginx()
|
mgr.rebuild_nginx()
|
||||||
mgr.create_selfsigned_cert()
|
mgr.create_selfsigned_cert()
|
||||||
|
elif args.action == 'change-password':
|
||||||
|
# Used during VM packaging
|
||||||
|
oldpassword = getpass.getpass('Old password: ')
|
||||||
|
newpassword = getpass.getpass('New password: ')
|
||||||
|
mgr.update_password(oldpassword, newpassword)
|
||||||
elif args.action == 'update-login':
|
elif args.action == 'update-login':
|
||||||
# Used by app install scripts
|
# Used by app install scripts
|
||||||
mgr.update_login(args.app, args.login, args.password)
|
mgr.update_login(args.app, args.login, args.password)
|
||||||
|
Loading…
Reference in New Issue
Block a user