Stackscript - Convert Existing Script to work for Debian

Hi,

I had a quick question, I found a stackscript that seemed to be what im after, but it is designed for Ubunutu and I am running Debian.

This is the ubunutu specific bit:

source <ssinclude stackscriptid="123"> ## lib-system-ubuntu {
    # Set hostname
    if [ "$HOSTNAME" ]; then
        system_update_hostname "$HOSTNAME"
    fi

    # Add users
    if [ "$USERNAME" ]; then
        system_add_user "$USERNAME" "$PASSWORD" "sudo"
        system_user_add_ssh_key "$USERNAME" "$SSH_KEY"
    fi

    system_add_user "$DEPLOY_USERNAME" "$PASSWORD" "sudo"
    system_user_add_ssh_key "$DEPLOY_USERNAME" "$SSH_KEY"

    # SSH
    system_sshd_passwordauthentication "no"
    system_sshd_permitrootlogin "no"
    system_sshd_pubkeyauthentication "yes"
## }</ssinclude>

Can I just change this:

lib-system-ubuntu 

to this:

lib-system-debian

Thanks for any help you can give?

James

1 Reply

@Spadez:

Can I just change this:

lib-system-ubuntu 

to this:

lib-system-debian

Thanks for any help you can give?

James

lib-system-ubuntu there is a comment (it's after a #). What you really need to do is go into the included stackscript and make sure that the functions being called (the ones starting with "system-" will work properly in debian. The answer is very likely yes.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct