configure fixes for headscale and nextcloud
This commit is contained in:
@@ -126,6 +126,9 @@ setup_superpanel() {
|
|||||||
setup_tailscale() {
|
setup_tailscale() {
|
||||||
# --reset and --force-reauth move the machine from any other tailnet;
|
# --reset and --force-reauth move the machine from any other tailnet;
|
||||||
# --operator lets you, and the Tailscale GNOME extension, use it without sudo
|
# --operator lets you, and the Tailscale GNOME extension, use it without sudo
|
||||||
|
if ! systemctl is-active -q tailscaled; then
|
||||||
|
sudo systemctl enable --now tailscaled || return 1
|
||||||
|
fi
|
||||||
echo "Open the link below to sign in to your Core's Tailscale network."
|
echo "Open the link below to sign in to your Core's Tailscale network."
|
||||||
sudo tailscale up --reset --force-reauth --login-server "https://headscale.$CORE_DOMAIN" \
|
sudo tailscale up --reset --force-reauth --login-server "https://headscale.$CORE_DOMAIN" \
|
||||||
--accept-routes --operator="$USER" || return 1
|
--accept-routes --operator="$USER" || return 1
|
||||||
@@ -262,9 +265,10 @@ EOF
|
|||||||
mkdir -p "$(dirname "$bookmarks")"
|
mkdir -p "$(dirname "$bookmarks")"
|
||||||
grep -qs "^file://$MOUNT " "$bookmarks" || echo "file://$MOUNT $CORE_DOMAIN" >> "$bookmarks"
|
grep -qs "^file://$MOUNT " "$bookmarks" || echo "file://$MOUNT $CORE_DOMAIN" >> "$bookmarks"
|
||||||
|
|
||||||
# sg picks up the network group now, without logging out and in again
|
# A new session through sudo picks up the network group now, without
|
||||||
|
# logging out and in again (Arch has no sg)
|
||||||
if ! mountpoint -q "$MOUNT"; then
|
if ! mountpoint -q "$MOUNT"; then
|
||||||
sg network -c "mount $MOUNT" || return 1
|
sudo -u "$USER" mount "$MOUNT" || return 1
|
||||||
fi
|
fi
|
||||||
echo "Your Nextcloud files are at $MOUNT (\"$CORE_DOMAIN\" in the Files sidebar)."
|
echo "Your Nextcloud files are at $MOUNT (\"$CORE_DOMAIN\" in the Files sidebar)."
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user