Skip to content

Commit 704c323

Browse files
committed
impr: update path to systemd files
1 parent 978620a commit 704c323

3 files changed

Lines changed: 9 additions & 11 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=${XDG_CONFIG_HOME}/figma-fonthelper/updater.sh
7+
ExecStart=/home/$(whoami)/.config/systemd/user/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=${XDG_CONFIG_HOME}/figma-fonthelper/fonthelper
7+
ExecStart=/home/$(whoami)/.config/systemd/user/figma-fonthelper/fonthelper
88
ExecStop=/bin/bash -c '`which killall` fonthelper'
99
Restart=on-failure
1010

res/install.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,21 @@ install() {
4444
EOF
4545
fi
4646

47-
cd $APP_DATA_DIR
47+
pushd $APP_DATA_DIR
4848
tar xJf /tmp/fonthelper.tar.xz ./fonthelper
4949
tar xJf /tmp/fonthelper.tar.xz ./updater.sh
5050
chmod +x ./fonthelper ./updater.sh
51-
cd /tmp
51+
popd
5252

5353
mkdir -p $CONFIG_DIR/systemd/user
54-
cd $CONFIG_DIR/systemd/user
54+
pushd $CONFIG_DIR/systemd/user
5555

5656
tar xJOf /tmp/fonthelper.tar.xz ./figma-fonthelper.service > figma-fonthelper.service
5757
tar xJOf /tmp/fonthelper.tar.xz ./figma-fonthelper-updater.service > figma-fonthelper-updater.service
5858

59-
sed -i "s@\${XDG_CONFIG_HOME}@${DATA_DIR}@g" ./figma-fonthelper.service
60-
sed -i "s@\${XDG_CONFIG_HOME}@${DATA_DIR}@g" ./figma-fonthelper-updater.service
61-
echo "[test_string]" >> ./figma-fonthelper.service
62-
6359
chmod 644 figma-fonthelper.service
6460
chmod 644 figma-fonthelper-updater.service
65-
66-
cd /tmp
61+
popd
6762

6863
systemctl --user daemon-reload
6964

@@ -73,6 +68,9 @@ EOF
7368
systemctl --user enable figma-fonthelper.service
7469
systemctl --user enable figma-fonthelper-updater.service
7570

71+
systemctl --user status figma-fonthelper.service
72+
systemctl --user status figma-fonthelper-updater.service
73+
7674
rm -rf ./fonthelper.tar*
7775
}
7876

0 commit comments

Comments
 (0)