Skip to content

Commit 2027764

Browse files
fix(script): set_orion_config.sh: update ExecStart line in orion.service to handle SCREEN_ROTATION only. (#26)
Co-authored-by: PaulGD03 <paulskapczyk@gmail.com>
1 parent 1914d1f commit 2027764

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

assets/scripts/set_orion_config.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ SERVICE_FILE="/etc/systemd/system/orion.service"
1111
LINES=$(cat $SERVICE_FILE)
1212

1313
# Replace the ExecStart line
14-
LINES=$(echo "$LINES" | sed "s|^ExecStart=.*|ExecStart=flutter-pi ${SCREEN_ROTATION:+-r $SCREEN_ROTATION} --release /home/$BASE_USER/orion|")
14+
if [ -n "$SCREEN_ROTATION" ]; then
15+
LINES=$(echo "$LINES" | sed "s|flutter-pi\s*\(-r\s*[0-9]*\)*|flutter-pi -r $SCREEN_ROTATION|")
16+
fi
1517

1618
# Write the updated lines back to the service file
1719
echo "$LINES" | sudo tee $SERVICE_FILE > /dev/null

0 commit comments

Comments
 (0)