Fix read/write issues
This commit is contained in:
@@ -12,6 +12,21 @@ LOG_FILE="/tmp/install_sshd.log"
|
|||||||
# Tmp Script dependent constants
|
# Tmp Script dependent constants
|
||||||
TAILSCALE_DIR="/usrdata/tailscale/"
|
TAILSCALE_DIR="/usrdata/tailscale/"
|
||||||
TAILSCALE_SYSD_DIR="/usrdata/tailscale/systemd"
|
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
|
# Create the systemd service file
|
||||||
cat <<EOF > "$SERVICE_FILE"
|
cat <<EOF > "$SERVICE_FILE"
|
||||||
@@ -36,6 +51,16 @@ GITTREE="development"
|
|||||||
TAILSCALE_DIR="/usrdata/tailscale/"
|
TAILSCALE_DIR="/usrdata/tailscale/"
|
||||||
TAILSCALE_SYSD_DIR="/usrdata/tailscale/systemd"
|
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() {
|
install_update_tailscale() {
|
||||||
echo "Checking if Tailscale is already installed..."
|
echo "Checking if Tailscale is already installed..."
|
||||||
if [ -f "$TAILSCALE_DIR/tailscale" ]; then
|
if [ -f "$TAILSCALE_DIR/tailscale" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user