Fix systemd unit name in make-etcd

This commit is contained in:
Vitaliy Filippov
2025-04-11 02:05:08 +03:00
parent dfde0e60f0
commit 4b660f1ce8
+7 -2
View File
@@ -40,6 +40,11 @@ async function run()
console.log("/etc/systemd/system/vitastor-etcd.service already exists");
process.exit(1);
}
if (!in_docker && fs.existsSync("/etc/systemd/system/etcd.service"))
{
console.log("/etc/systemd/system/etcd.service already exists");
process.exit(1);
}
const config = JSON.parse(fs.readFileSync(config_path, { encoding: 'utf-8' }));
if (!config.etcd_address)
{
@@ -97,8 +102,8 @@ WantedBy=multi-user.target
`);
await system(`useradd etcd`);
await system(`systemctl daemon-reload`);
await system(`systemctl enable etcd`);
await system(`systemctl start etcd`);
await system(`systemctl enable vitastor-etcd`);
await system(`systemctl start vitastor-etcd`);
process.exit(0);
}