Skip to content

Commit 7c8b202

Browse files
committed
impr: update systemd files
1 parent 704c323 commit 7c8b202

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

res/figma-fonthelper-updater.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ After=systemd-user-sessions.service
44

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

res/figma-fonthelper.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ After=systemd-user-sessions.service
44

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

res/install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ EOF
5353
mkdir -p $CONFIG_DIR/systemd/user
5454
pushd $CONFIG_DIR/systemd/user
5555

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

5959
chmod 644 figma-fonthelper.service
6060
chmod 644 figma-fonthelper-updater.service
@@ -68,8 +68,8 @@ EOF
6868
systemctl --user enable figma-fonthelper.service
6969
systemctl --user enable figma-fonthelper-updater.service
7070

71-
systemctl --user status figma-fonthelper.service
72-
systemctl --user status figma-fonthelper-updater.service
71+
systemctl --user -q status figma-fonthelper.service
72+
systemctl --user -q status figma-fonthelper-updater.service
7373

7474
rm -rf ./fonthelper.tar*
7575
}

0 commit comments

Comments
 (0)