diff --git a/startup.bash b/startup.bash index 41b1a42..a90fb3d 100644 --- a/startup.bash +++ b/startup.bash @@ -2,22 +2,26 @@ #### -# Notes -# -# Main jobs -# -# - Start zeroteir-one -# - Check that it's running and continuing to run -# - Start sshd -# - Check that it's running and continuing to run -# - Start weechat in tmux -# - Check that it's running and continuing to run +# Runtime Config + +# Copy authorized_keys secret to the user's ssh config folder +# (symlinking will not do, because sshd checks perms of the file tree above the target of the link) +install -Dm 600 -o thurstylark -g thurstylark /run/secrets/tl-weechat-authorizedkeys /home/thurstylark/.ssh/authorized_keys + +#### +# Service startup + +# Start zerotier-one in daemon mode zerotier-one -d - +# Start sshd sshd -tmux -f ~/.tmux.conf -L tl-weechat new-session -ds tl-weechat weechat + +#### +# Start weechat within tmux as thurstylark + +runuser -u thurstylark -- tmux -f ~/.tmux.conf -L tl-weechat new-session -ds tl-weechat weechat