Giter VIP home page Giter VIP logo

Comments (2)

mhfowler avatar mhfowler commented on August 20, 2024 1

also will look at that here ArchiveBox/ArchiveBox#734

from archivebox_ynh.

yalh76 avatar yalh76 commented on August 20, 2024

allowing $ in the password requires to escape the replacement on thoses lines:

if [ $USER_EXISTS -eq 1 ]
then
ynh_script_progression --message="User already exists: setting admin password" --weight=1
ynh_exec_as $app /usr/bin/expect<<EOF
set force_conservative 0 ;
set timeout -1
spawn sh -c "cd $datadir && $archivebox_cmd manage changepassword $admin"
match_max 100000
expect "*?assword: "
send -- "$password\r"
expect "*?assword (again): "
send -- "$password\r"
expect eof
EOF
else
ynh_script_progression --message="Creating new archivebox superuser: $admin" --weight=1
ynh_exec_as $app /usr/bin/expect<<EOF
set force_conservative 0 ;
set timeout -1
spawn sh -c "cd $datadir && $archivebox_cmd manage createsuperuser --username $admin --email $admin_mail"
match_max 100000
expect "*?assword: "
send -- "$password\r"
expect "*?assword (again): "
send -- "$password\r"
expect eof
EOF
fi

If you think you can do it, feels free to do a PR

from archivebox_ynh.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.