Fix read/write issues

This commit is contained in:
iamromulan
2024-05-10 20:56:40 -04:00
parent 603096ce81
commit c4fd0d6c7d

View File

@@ -12,6 +12,21 @@ LOG_FILE="/tmp/install_sshd.log"
# Tmp Script dependent constants
TAILSCALE_DIR="/usrdata/tailscale/"
TAILSCALE_SYSD_DIR="/usrdata/tailscale/systemd"
# Function to remount file system as read-write
remount_rw() {
mount -o remount,rw /
}
# Function to remount file system as read-only
remount_ro() {
mount -o remount,ro /
}
# Installation Prep
remount_rw
systemctl daemon-reload
rm $SERVICE_FILE > /dev/null 2>&1
rm $SERVICE_NAME > /dev/null 2>&1
# Create the systemd service file
cat <<EOF > "$SERVICE_FILE"
@@ -36,6 +51,16 @@ GITTREE="development"
TAILSCALE_DIR="/usrdata/tailscale/"
TAILSCALE_SYSD_DIR="/usrdata/tailscale/systemd"
# Function to remount file system as read-write
remount_rw() {
mount -o remount,rw /
}
# Function to remount file system as read-only
remount_ro() {
mount -o remount,ro /
}
install_update_tailscale() {
echo "Checking if Tailscale is already installed..."
if [ -f "$TAILSCALE_DIR/tailscale" ]; then