Fix installer

parent 0458f702
......@@ -2050,6 +2050,21 @@ exit 0
'',
'# Generate unique client ID',
f'ID_CLIENT="{client_id}"',
'',
'LOG_FILE="/home/mbetterclient/debug.log"',
'if [ -f "$LOG_FILE" ]; then',
' # 1. Rotate existing backups (5 -> remove, 4 -> 5, etc.)',
' [ -f "${LOG_FILE}.4" ] && mv "${LOG_FILE}.4" "${LOG_FILE}.5"',
' [ -f "${LOG_FILE}.3" ] && mv "${LOG_FILE}.3" "${LOG_FILE}.4"',
' [ -f "${LOG_FILE}.2" ] && mv "${LOG_FILE}.2" "${LOG_FILE}.3"',
' [ -f "${LOG_FILE}.1" ] && mv "${LOG_FILE}.1" "${LOG_FILE}.2"',
'',
' # 2. Move current log to .1',
' mv "$LOG_FILE" "${LOG_FILE}.1"',
'',
' # 3. Ensure permissions remain correct for the user',
' chown mbetterclient:mbetterclient "${LOG_FILE}."*',
'fi',
'',
'# Save the client ID to file',
'echo -n "$ID_CLIENT" > /tmp/IDCLIENT.txt',
......
......@@ -1478,6 +1478,8 @@ if which dbus-launch >/dev/null && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
fi
xset -dpms; xset s off; xset s noblank
(sleep 5 && xrandr --auto) &
# Start Compositor and Window Manager in background
#picom -b --backend glx --config /dev/null &
......@@ -2048,6 +2050,21 @@ exit 0
'',
'# Generate unique client ID',
f'ID_CLIENT="{client_id}"',
'',
'LOG_FILE="/home/mbetterclient/debug.log"',
'if [ -f "$LOG_FILE" ]; then',
' # 1. Rotate existing backups (5 -> remove, 4 -> 5, etc.)',
' [ -f "${LOG_FILE}.4" ] && mv "${LOG_FILE}.4" "${LOG_FILE}.5"',
' [ -f "${LOG_FILE}.3" ] && mv "${LOG_FILE}.3" "${LOG_FILE}.4"',
' [ -f "${LOG_FILE}.2" ] && mv "${LOG_FILE}.2" "${LOG_FILE}.3"',
' [ -f "${LOG_FILE}.1" ] && mv "${LOG_FILE}.1" "${LOG_FILE}.2"',
'',
' # 2. Move current log to .1',
' mv "$LOG_FILE" "${LOG_FILE}.1"',
'',
' # 3. Ensure permissions remain correct for the user',
' chown mbetterclient:mbetterclient "${LOG_FILE}."*',
'fi',
'',
'# Save the client ID to file',
'echo -n "$ID_CLIENT" > /tmp/IDCLIENT.txt',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment