@shellus/way 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +2 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -157,13 +157,14 @@ function cronToSystemd(cron) {
157
157
  async function systemd(options) {
158
158
  const wayDir = process.env.WAY_DIR || `${process.env.HOME}/.way`;
159
159
  const config = loadConfig(wayDir, options.remote);
160
+ const wayPath = execSync("which way", { encoding: "utf-8" }).trim();
160
161
  const serviceContent = `[Unit]
161
162
  Description=Way Backup Service
162
163
  After=network.target
163
164
 
164
165
  [Service]
165
166
  Type=oneshot
166
- ExecStart=/usr/local/bin/way run
167
+ ExecStart=${wayPath} run
167
168
  Environment="WAY_DIR=${wayDir}"
168
169
  `;
169
170
  const timerContent = `[Unit]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shellus/way",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "将备份作为持续运营的项目,而非一次性任务。基于 restic 的策略封装。",
5
5
  "type": "module",
6
6
  "bin": {