mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
feat: auto create config folder and player network
This commit is contained in:
1 parent
91ebaec22c
commit
b449d84c54
5 files changed
+25
-2
No files matched your search
@@ -2,10 +2,14 @@
|
||||
|
||||
USERNAME=commander
|
||||
|
||||
echo "Initializing container for $USERNAME"
|
||||
|
||||
if ! id -u ${USERNAME} >/dev/null 2>&1; then
|
||||
echo "Adding user $USERNAME"
|
||||
adduser --disabled-password --gecos '' --shell /bin/zsh ${USERNAME} && \
|
||||
find / -name ".gitkeep" -type f -exec rm -f {} +
|
||||
|
||||
echo "Adding public key for $USERNAME"
|
||||
PUB_KEY=/etc/ssh/authorized_keys/${USERNAME}
|
||||
cp /ssh_key.pub ${PUB_KEY}
|
||||
chmod 644 ${PUB_KEY}
|
||||
|
||||
Reference in new issue
Block a user