rename daemon

This commit is contained in:
Harivansh Rathi 2026-03-05 21:37:29 -08:00
parent 01a18a96aa
commit 0973c1cbc5
2 changed files with 9 additions and 14 deletions

View file

@ -56,7 +56,7 @@ This installer:
- writes `~/.local/bin/pi` launcher, - writes `~/.local/bin/pi` launcher,
- populates `~/.pi/agent/settings.json` with package list, - populates `~/.pi/agent/settings.json` with package list,
- installs packages (if `npm` is available), - installs packages (if `npm` is available),
- and can install a user systemd service for `pi gateway` so it stays alive. - and can install a user systemd service for `pi daemon` so it stays alive.
Preinstalled package sources are: Preinstalled package sources are:
@ -100,20 +100,21 @@ Run:
Run in background with extensions active: Run in background with extensions active:
```bash ```bash
./pi gateway ./pi daemon
``` ```
For a user systemd setup, create `~/.config/systemd/user/pi.service` with: For a user systemd setup, create `~/.config/systemd/user/pi.service` with:
```ini ```ini
[Unit] [Unit]
Description=pi gateway Description=pi daemon
After=network-online.target After=network-online.target
[Service] [Service]
Type=simple Type=simple
Environment=CO_MONO_AGENT_DIR=%h/.pi/agent
Environment=PI_CODING_AGENT_DIR=%h/.pi/agent Environment=PI_CODING_AGENT_DIR=%h/.pi/agent
ExecStart=/absolute/path/to/repo/pi gateway ExecStart=/absolute/path/to/repo/pi daemon
Restart=always Restart=always
RestartSec=5 RestartSec=5

View file

@ -231,10 +231,8 @@ resolve_release_tag() {
platform_assets() { platform_assets() {
if [[ "$PLATFORM" == "windows"* ]]; then if [[ "$PLATFORM" == "windows"* ]]; then
echo "pi-${PLATFORM}.zip" echo "pi-${PLATFORM}.zip"
echo "co-mono-${PLATFORM}.zip"
else else
echo "pi-${PLATFORM}.tar.gz" echo "pi-${PLATFORM}.tar.gz"
echo "co-mono-${PLATFORM}.tar.gz"
fi fi
} }
@ -347,14 +345,14 @@ write_service_file() {
local service_path="$HOME/.config/systemd/user/${SERVICE_NAME}.service" local service_path="$HOME/.config/systemd/user/${SERVICE_NAME}.service"
cat > "$service_path" <<EOF cat > "$service_path" <<EOF
[Unit] [Unit]
Description=pi gateway Description=pi daemon
After=network-online.target After=network-online.target
[Service] [Service]
Type=simple Type=simple
Environment=CO_MONO_AGENT_DIR=${AGENT_DIR} Environment=CO_MONO_AGENT_DIR=${AGENT_DIR}
Environment=PI_CODING_AGENT_DIR=${AGENT_DIR} Environment=PI_CODING_AGENT_DIR=${AGENT_DIR}
ExecStart=${BIN_DIR}/pi gateway ExecStart=${BIN_DIR}/pi daemon
Restart=always Restart=always
RestartSec=5 RestartSec=5
@ -381,7 +379,7 @@ print_next_steps() {
echo " pi" echo " pi"
echo echo
echo "Run always-on:" echo "Run always-on:"
echo " pi gateway" echo " pi daemon"
echo echo
if [[ "$SETUP_DAEMON" == "1" ]] && [[ "$SKIP_SERVICE" == "0" ]]; then if [[ "$SETUP_DAEMON" == "1" ]] && [[ "$SKIP_SERVICE" == "0" ]]; then
echo "Service:" echo "Service:"
@ -419,7 +417,7 @@ bootstrap_from_source() {
log "Running source install" log "Running source install"
( (
cd "$source_dir" cd "$source_dir"
PI_AGENT_DIR="$AGENT_DIR" \ CO_MONO_AGENT_DIR="$AGENT_DIR" \
PI_CODING_AGENT_DIR="$AGENT_DIR" \ PI_CODING_AGENT_DIR="$AGENT_DIR" \
./install.sh ./install.sh
) )
@ -464,8 +462,6 @@ install_from_release() {
local install_binary local install_binary
if [[ -d "$workdir/pi" ]]; then if [[ -d "$workdir/pi" ]]; then
release_dir="$workdir/pi" release_dir="$workdir/pi"
elif [[ -d "$workdir/co-mono" ]]; then
release_dir="$workdir/co-mono"
elif [[ -f "$workdir/pi" ]]; then elif [[ -f "$workdir/pi" ]]; then
release_dir="$workdir" release_dir="$workdir"
fi fi
@ -480,8 +476,6 @@ install_from_release() {
if [[ -x "$INSTALL_DIR/pi" ]]; then if [[ -x "$INSTALL_DIR/pi" ]]; then
install_binary="$INSTALL_DIR/pi" install_binary="$INSTALL_DIR/pi"
elif [[ -x "$INSTALL_DIR/co-mono" ]]; then
install_binary="$INSTALL_DIR/co-mono"
else else
return 1 return 1
fi fi