mirror of https://github.com/fairyglade/ly.git
Backport: Add missing supervise symlink on runit
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
802ad6bbed
commit
5796720a9c
|
@ -126,9 +126,12 @@ pub fn ServiceInstaller(comptime init_system: InitSystem) type {
|
||||||
var service_dir = std.fs.cwd().openDir(service_path, .{}) catch unreachable;
|
var service_dir = std.fs.cwd().openDir(service_path, .{}) catch unreachable;
|
||||||
defer service_dir.close();
|
defer service_dir.close();
|
||||||
|
|
||||||
|
const supervise_path = try std.fs.path.join(allocator, &[_][]const u8{ service_path, "supervise" });
|
||||||
|
|
||||||
try std.fs.cwd().copyFile("res/ly-runit-service/conf", service_dir, "conf", .{});
|
try std.fs.cwd().copyFile("res/ly-runit-service/conf", service_dir, "conf", .{});
|
||||||
try std.fs.cwd().copyFile("res/ly-runit-service/finish", service_dir, "finish", .{ .override_mode = 0o755 });
|
try std.fs.cwd().copyFile("res/ly-runit-service/finish", service_dir, "finish", .{ .override_mode = 0o755 });
|
||||||
try std.fs.cwd().copyFile("res/ly-runit-service/run", service_dir, "run", .{ .override_mode = 0o755 });
|
try std.fs.cwd().copyFile("res/ly-runit-service/run", service_dir, "run", .{ .override_mode = 0o755 });
|
||||||
|
try std.fs.cwd().symLink("/run/runit/supervise.ly", supervise_path, .{});
|
||||||
},
|
},
|
||||||
.Systemd => {
|
.Systemd => {
|
||||||
const service_path = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, "/usr/lib/systemd/system" });
|
const service_path = try std.fs.path.join(allocator, &[_][]const u8{ dest_directory, "/usr/lib/systemd/system" });
|
||||||
|
|
Loading…
Reference in New Issue