Skip to content

Commit

Permalink
chore: installer add user first before systemd
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ-Jackson committed Jan 28, 2025
1 parent 588cc7a commit 360eaa7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions create_server_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ def copy(src: str, dest: str):
# Copy opt
cp -rp opt/run-deploy /opt
# Setup system service
{systemd_symlinks}
{systemd_cmd}
# Add user and harden home directory, and copy authorized_keys
useradd -m -s /bin/dash {toml_config['deploy_user']}
chown root:{toml_config['deploy_user']} /home/{toml_config['deploy_user']} /home/{toml_config['deploy_user']}/.* 2> /dev/null
Expand All @@ -141,6 +137,10 @@ def copy(src: str, dest: str):
cp /opt/run-deploy/ssh/authorized_keys /home/{toml_config['deploy_user']}/.ssh
chown root:{toml_config['deploy_user']} /home/{toml_config['deploy_user']}/.ssh/authorized_keys
# Setup system service
{systemd_symlinks}
{systemd_cmd}
exit 0
""", 'utf-8')
install.chmod(0o755)
Expand Down

0 comments on commit 360eaa7

Please sign in to comment.