tl-weechat-container/startup.bash

28 lines
581 B
Bash
Raw Normal View History

2022-05-09 02:24:03 +00:00
#!/usr/bin/env bash -x
####
2022-05-27 17:35:43 +00:00
# Runtime Config
2022-05-09 02:24:03 +00:00
2022-05-27 17:35:43 +00:00
# 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
2022-05-09 02:24:03 +00:00
2022-05-27 17:35:43 +00:00
####
# Service startup
# Start zerotier-one in daemon mode
zerotier-one -d
# Start sshd
sshd
2022-05-09 02:24:03 +00:00
2022-05-27 17:35:43 +00:00
####
# Start weechat within tmux as thurstylark
runuser -u thurstylark -- tmux -f ~/.tmux.conf -L tl-weechat new-session -ds tl-weechat weechat