systemd-service 0.3.1

Generate service files for the application
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub fn is_root() -> bool {
    #[cfg(unix)]
    {
        unsafe extern "C" {
            unsafe fn geteuid() -> u32;
        }

        unsafe { geteuid() == 0 }
    }

    #[cfg(not(unix))]
    {
        false
    }
}