-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Running in background
Håkan Jerning edited this page Mar 12, 2025
·
8 revisions
Location tracking is enabled through /dev/location. Reading from this device will start tracking your location and output a line each time your location updates. This prevents iSH from suspending when in the background.
You can get the app to run in the background with the following command:
cat /dev/location > /dev/null &To stop running in the background:
killall -9 catIf you use services and OpenRC, here is a service script that automates the task at every startup. Save it as /etc/init.d/runbg.
Then make the script executable and add it to your startup services:
chmod 755 /etc/init.d/runbg
rc-update add runbg default#!/sbin/openrc-run
#
# Copyright (c) 2021-2024: Jacob.Lundqvist@gmail.com
# License: MIT
#
# This service reads the GPS and discards the output to /dev/null.
# This is not tracking you in any way. The sole purpose of this
# is to ensure an iOS program continues to run in the background.
# This process has no noticeable impact on battery life.
#
description="Reads GPS to ensure iSH continues to run in the background"
command="/bin/cat"
command_args="/dev/location > /dev/null"
command_background="YES"
pidfile="/run/runbg.pid"- Contributing to iSH Development
- How to add a new Character Device to iSH
- How to add a new entry to /proc/ish
- Fixing hostname localhost
- Running nmap
- Running Ruby Programs
- Installing PHP with a TLS certificate and a PHP filemanager
- Installing R and any package from the CRAN
- iSH Alpine Release Issues
- Using Alpine Linux repositories
- Upgrading to a new release
- Install & Activate Alternate Filesystems