Fix permissions
This commit is contained in:
@@ -20,7 +20,7 @@ remount_rw() {
|
|||||||
remount_ro() {
|
remount_ro() {
|
||||||
mount -o remount,ro /
|
mount -o remount,ro /
|
||||||
}
|
}
|
||||||
|
remount_rw
|
||||||
# Create the systemd service file
|
# Create the systemd service file
|
||||||
cat <<EOF > "$SERVICE_FILE"
|
cat <<EOF > "$SERVICE_FILE"
|
||||||
[Unit]
|
[Unit]
|
||||||
@@ -188,7 +188,6 @@ install_ttyd() {
|
|||||||
|
|
||||||
echo -e "\e[1;32mInstallation Complete! ttyd server is up.\e[0m"
|
echo -e "\e[1;32mInstallation Complete! ttyd server is up.\e[0m"
|
||||||
}
|
}
|
||||||
remount_rw
|
|
||||||
uninstall_simpleadmin
|
uninstall_simpleadmin
|
||||||
install_lighttpd
|
install_lighttpd
|
||||||
install_simpleadmin
|
install_simpleadmin
|
||||||
|
|||||||
@@ -14,6 +14,16 @@ SIMPLE_FIREWALL_DIR="/usrdata/simplefirewall"
|
|||||||
SIMPLE_FIREWALL_SCRIPT="$SIMPLE_FIREWALL_DIR/simplefirewall.sh"
|
SIMPLE_FIREWALL_SCRIPT="$SIMPLE_FIREWALL_DIR/simplefirewall.sh"
|
||||||
SIMPLE_FIREWALL_SYSTEMD_DIR="$SIMPLE_FIREWALL_DIR/systemd"
|
SIMPLE_FIREWALL_SYSTEMD_DIR="$SIMPLE_FIREWALL_DIR/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 /
|
||||||
|
}
|
||||||
|
remount_rw
|
||||||
# Create the systemd service file
|
# Create the systemd service file
|
||||||
cat <<EOF > "$SERVICE_FILE"
|
cat <<EOF > "$SERVICE_FILE"
|
||||||
[Unit]
|
[Unit]
|
||||||
@@ -81,7 +91,6 @@ install_simple_firewall() {
|
|||||||
systemctl start ttl-override
|
systemctl start ttl-override
|
||||||
echo -e "\033[0;32mSimple Firewall installation/update complete.\033[0m"
|
echo -e "\033[0;32mSimple Firewall installation/update complete.\033[0m"
|
||||||
}
|
}
|
||||||
remount_rw
|
|
||||||
uninstall_simple_firewall
|
uninstall_simple_firewall
|
||||||
install_simple_firewall
|
install_simple_firewall
|
||||||
remount_ro
|
remount_ro
|
||||||
|
|||||||
@@ -12,7 +12,16 @@ LOG_FILE="/tmp/install_socat-at-bridge.log"
|
|||||||
# Tmp Script dependent constants
|
# Tmp Script dependent constants
|
||||||
SOCAT_AT_DIR="/usrdata/socat-at-bridge"
|
SOCAT_AT_DIR="/usrdata/socat-at-bridge"
|
||||||
SOCAT_AT_SYSD_DIR="/usrdata/socat-at-bridge/systemd_units"
|
SOCAT_AT_SYSD_DIR="/usrdata/socat-at-bridge/systemd_units"
|
||||||
|
# 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 /
|
||||||
|
}
|
||||||
|
remount_rw
|
||||||
# Create the systemd service file
|
# Create the systemd service file
|
||||||
cat <<EOF > "$SERVICE_FILE"
|
cat <<EOF > "$SERVICE_FILE"
|
||||||
[Unit]
|
[Unit]
|
||||||
@@ -127,6 +136,7 @@ install_at_socat() {
|
|||||||
}
|
}
|
||||||
uninstall_at_socat
|
uninstall_at_socat
|
||||||
install_at_socat
|
install_at_socat
|
||||||
|
remount_ro
|
||||||
exit 0
|
exit 0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user