mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Update headscale user creation settings in .deb (#2134)
* Update headscale user creation settings in .deb
Update the headscale user settings to:
- shell = /usr/sbin/nologin
- home-dir = /var/lib/headscale
This syncs the .deb installation behavior with the current Linux docs:
fe68f50328/docs/running-headscale-linux-manual.md (L39-L45)
Fixes juanfont/headscale#2133
* slight refactor to use existing variables.
* Fixup for HOME_DIR var
This commit is contained in:
parent
5eda9c8d2d
commit
63035cdb5a
1 changed files with 3 additions and 1 deletions
|
@ -6,8 +6,10 @@
|
||||||
HEADSCALE_EXE="/usr/bin/headscale"
|
HEADSCALE_EXE="/usr/bin/headscale"
|
||||||
BSD_HIER=""
|
BSD_HIER=""
|
||||||
HEADSCALE_RUN_DIR="/var/run/headscale"
|
HEADSCALE_RUN_DIR="/var/run/headscale"
|
||||||
|
HEADSCALE_HOME_DIR="/var/lib/headscale"
|
||||||
HEADSCALE_USER="headscale"
|
HEADSCALE_USER="headscale"
|
||||||
HEADSCALE_GROUP="headscale"
|
HEADSCALE_GROUP="headscale"
|
||||||
|
HEADSCALE_SHELL="/usr/sbin/nologin"
|
||||||
|
|
||||||
ensure_sudo() {
|
ensure_sudo() {
|
||||||
if [ "$(id -u)" = "0" ]; then
|
if [ "$(id -u)" = "0" ]; then
|
||||||
|
@ -29,7 +31,7 @@ ensure_headscale_path() {
|
||||||
|
|
||||||
create_headscale_user() {
|
create_headscale_user() {
|
||||||
printf "PostInstall: Adding headscale user %s\n" "$HEADSCALE_USER"
|
printf "PostInstall: Adding headscale user %s\n" "$HEADSCALE_USER"
|
||||||
useradd -s /bin/sh -c "headscale default user" headscale
|
useradd -s "$HEADSCALE_SHELL" -d "$HEADSCALE_HOME_DIR" -c "headscale default user" "$HEADSCALE_USER"
|
||||||
}
|
}
|
||||||
|
|
||||||
create_headscale_group() {
|
create_headscale_group() {
|
||||||
|
|
Loading…
Reference in a new issue