Stackscript - Convert Existing Script to work for Debian
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.