Skip to content

Commit

Permalink
refactor(stage2): fix small service bug
Browse files Browse the repository at this point in the history
  • Loading branch information
steveiliop56 committed Feb 6, 2024
1 parent 924abd2 commit a50eb6e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
## ${{ needs.create-tag.outputs.tagname }}
### Improvements
- Update runtipi version to ${{ needs.create-tag.outputs.tagname }}
Expand Down
9 changes: 5 additions & 4 deletions stage2/04-install-runtipi/01-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ install -v files/runtipi.service "${ROOTFS_DIR}/etc/systemd/system/runtipi.servi

echo "Make tweaks..."

sed -i "s|User=username|User=${FIRST_USER_NAME}|" "${ROOTFS_DIR}/etc/systemd/system/runtipi.service"
sed -i "s|WorkingDirectory=/home/username/runtipi/|WorkingDirectory=${RUNTIPI_PATH}|" "${ROOTFS_DIR}/etc/systemd/system/runtipi.service"
sed -i "s|ExecStart=/home/username/runtipi/runtipi-cli start|ExecStart=${RUNTIPI_PATH}/runtipi-cli start|" "${ROOTFS_DIR}/etc/systemd/system/runtipi.service"
sed -i "s|ExecStop=/home/username/runtipi/runtipi-cli stop|ExecStop=${RUNTIPI_PATH}/runtipi-cli stop|" "${ROOTFS_DIR}/etc/systemd/system/runtipi.service"
# sed -i "s|User=username|User=${FIRST_USER_NAME}|" "${ROOTFS_DIR}/etc/systemd/system/runtipi.service"
# Add this: `User=username` to files/runtipi.service under `[Service]` for rootless
sed -i "s|WorkingDirectory=/home/username/runtipi/|WorkingDirectory=/home/${FIRST_USER_NAME}/runtipi|" "${ROOTFS_DIR}/etc/systemd/system/runtipi.service"
sed -i "s|ExecStart=/home/username/runtipi/runtipi-cli start|ExecStart=/home/${FIRST_USER_NAME}/runtipi/runtipi-cli start|" "${ROOTFS_DIR}/etc/systemd/system/runtipi.service"
sed -i "s|ExecStop=/home/username/runtipi/runtipi-cli stop|ExecStop=/home/${FIRST_USER_NAME}/runtipi/runtipi-cli stop|" "${ROOTFS_DIR}/etc/systemd/system/runtipi.service"

chmod -x "${ROOTFS_DIR}/etc/systemd/system/runtipi.service"

Expand Down
1 change: 0 additions & 1 deletion stage2/04-install-runtipi/files/runtipi.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ After=docker.service network-online.target
[Service]
Restart=always
RemainAfterExit=yes
User=username
WorkingDirectory=/home/username/runtipi/
ExecStart=/home/username/runtipi/runtipi-cli start
ExecStop=/home/username/runtipi/runtipi-cli stop
Expand Down

0 comments on commit a50eb6e

Please sign in to comment.