ramm 0.0.42 → 0.0.43
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.
- package/dist/ramm.js +5 -1
- package/dist/types/ramm.d.ts +1 -1
- package/dist/types/systemd.d.ts +1 -0
- package/package.json +1 -1
package/dist/ramm.js
CHANGED
|
@@ -222,6 +222,9 @@ var formatUserspace = (command, context = defaultContext) => {
|
|
|
222
222
|
const userPart = context.userspace ? " --user " : "";
|
|
223
223
|
return "systemctl" + userPart + " " + command.slice(systemctlWordLangth);
|
|
224
224
|
};
|
|
225
|
+
var reloadSystemd = async (context = defaultContext) => {
|
|
226
|
+
await execCommand(formatUserspace("systemctl daemon-reload", context));
|
|
227
|
+
};
|
|
225
228
|
var startSystemdUnit = async (unitName, context = defaultContext) => {
|
|
226
229
|
await execCommand(formatUserspace(`systemctl start ${unitName}`, context));
|
|
227
230
|
};
|
|
@@ -241,7 +244,7 @@ var checkSystemdUnit = async (serviceName, context = defaultContext) => {
|
|
|
241
244
|
var createSystemdUnit = async (unitName, content, context = defaultContext) => {
|
|
242
245
|
const pathToSeviceTarget = getSystemdPathToService(unitName, context);
|
|
243
246
|
await writeFileFull(pathToSeviceTarget, content);
|
|
244
|
-
await
|
|
247
|
+
await reloadSystemd(context);
|
|
245
248
|
};
|
|
246
249
|
var getSystemdPathToService = (serviceName, context = defaultContext) => {
|
|
247
250
|
if (context.userspace) {
|
|
@@ -491,6 +494,7 @@ export {
|
|
|
491
494
|
runPodmanContainerService,
|
|
492
495
|
runPodmanContainer,
|
|
493
496
|
restartSystemdUnit,
|
|
497
|
+
reloadSystemd,
|
|
494
498
|
printBlock,
|
|
495
499
|
passVarsServer,
|
|
496
500
|
passVarsClient,
|
package/dist/types/ramm.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { Context } from "./context.ts";
|
|
|
3
3
|
export { installBun } from "./init.ts";
|
|
4
4
|
export { installPodman, runPodmanContainer, loginPodman } from "./podman.ts";
|
|
5
5
|
export { runPodmanContainerService, addNftPodmanRule } from "./podman.ts";
|
|
6
|
-
export { startSystemdUnit, enabledSystemdUnit, restartSystemdUnit, createSystemdService, getSystemdPathToService, createSystemdUnit, } from "./systemd.ts";
|
|
6
|
+
export { startSystemdUnit, enabledSystemdUnit, restartSystemdUnit, createSystemdService, getSystemdPathToService, createSystemdUnit, reloadSystemd, } from "./systemd.ts";
|
|
7
7
|
export { installSystemPackage } from "./packages.ts";
|
|
8
8
|
export { printBlock } from "./print.ts";
|
|
9
9
|
export { setupNftable } from "./nft.ts";
|
package/dist/types/systemd.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Context } from "./context.ts";
|
|
2
|
+
export declare const reloadSystemd: (context?: Context) => Promise<void>;
|
|
2
3
|
export declare const startSystemdUnit: (unitName: string, context?: Context) => Promise<void>;
|
|
3
4
|
export declare const enabledSystemdUnit: (unitName: string, context?: Context) => Promise<void>;
|
|
4
5
|
export declare const restartSystemdUnit: (name: string, context?: Context) => Promise<void>;
|
package/package.json
CHANGED