Skip to content

Commit

Permalink
impr: update systemd files
Browse files Browse the repository at this point in the history
  • Loading branch information
ChugunovRoman committed Apr 5, 2023
1 parent 704c323 commit 7c8b202
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion res/figma-fonthelper-updater.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=systemd-user-sessions.service

[Service]
Type=simple
ExecStart=/home/$(whoami)/.config/systemd/user/figma-fonthelper/updater.sh
ExecStart=${XDG_CONFIG_HOME}/figma-fonthelper/updater.sh
ExecStop=/bin/bash -c "`which kill` -f -s SIGTERM `ps --no-headers -fC updater.sh | awk '{print $2}'`"
Restart=on-failure

Expand Down
2 changes: 1 addition & 1 deletion res/figma-fonthelper.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=systemd-user-sessions.service

[Service]
Type=simple
ExecStart=/home/$(whoami)/.config/systemd/user/figma-fonthelper/fonthelper
ExecStart=${XDG_CONFIG_HOME}/figma-fonthelper/fonthelper
ExecStop=/bin/bash -c '`which killall` fonthelper'
Restart=on-failure

Expand Down
8 changes: 4 additions & 4 deletions res/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ EOF
mkdir -p $CONFIG_DIR/systemd/user
pushd $CONFIG_DIR/systemd/user

tar xJOf /tmp/fonthelper.tar.xz ./figma-fonthelper.service > figma-fonthelper.service
tar xJOf /tmp/fonthelper.tar.xz ./figma-fonthelper-updater.service > figma-fonthelper-updater.service
tar xJOf /tmp/fonthelper.tar.xz ./figma-fonthelper.service | XDG_CONFIG_HOME=$DATA_DIR envsubst > figma-fonthelper.service
tar xJOf /tmp/fonthelper.tar.xz ./figma-fonthelper-updater.service | XDG_CONFIG_HOME=$DATA_DIR envsubst > figma-fonthelper-updater.service

chmod 644 figma-fonthelper.service
chmod 644 figma-fonthelper-updater.service
Expand All @@ -68,8 +68,8 @@ EOF
systemctl --user enable figma-fonthelper.service
systemctl --user enable figma-fonthelper-updater.service

systemctl --user status figma-fonthelper.service
systemctl --user status figma-fonthelper-updater.service
systemctl --user -q status figma-fonthelper.service
systemctl --user -q status figma-fonthelper-updater.service

rm -rf ./fonthelper.tar*
}
Expand Down

0 comments on commit 7c8b202

Please sign in to comment.