mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 23:32:14 +02:00
data: install systemd system service
This commit is contained in:
21
data/eg25-manager.service.in
Normal file
21
data/eg25-manager.service.in
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Quectel EG25 modem
|
||||||
|
Before=ModemManager.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=@bindir@/eg25manager
|
||||||
|
Restart=on-failure
|
||||||
|
ProtectControlGroups=true
|
||||||
|
ProtectHome=true
|
||||||
|
ProtectSystem=strict
|
||||||
|
RestrictSUIDSGID=true
|
||||||
|
PrivateTmp=true
|
||||||
|
MemoryDenyWriteExecute=true
|
||||||
|
PrivateMounts=true
|
||||||
|
NoNewPrivileges=true
|
||||||
|
CapabilityBoundingSet=
|
||||||
|
LockPersonality=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@@ -11,3 +11,13 @@ conf_files = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
install_data(conf_files)
|
install_data(conf_files)
|
||||||
|
|
||||||
|
serviceconf = configuration_data()
|
||||||
|
serviceconf.set('bindir', bindir)
|
||||||
|
configure_file(
|
||||||
|
input: 'eg25-manager.service.in',
|
||||||
|
output: 'eg25-manager.service',
|
||||||
|
install_dir: systemdsystemdir,
|
||||||
|
configuration: serviceconf,
|
||||||
|
install: true
|
||||||
|
)
|
||||||
|
@@ -28,6 +28,8 @@ datadir = get_option('datadir')
|
|||||||
sysconfdir = get_option('sysconfdir')
|
sysconfdir = get_option('sysconfdir')
|
||||||
bindir = join_paths(prefix, get_option('bindir'))
|
bindir = join_paths(prefix, get_option('bindir'))
|
||||||
udevrulesdir = join_paths(prefix, 'lib/udev/rules.d')
|
udevrulesdir = join_paths(prefix, 'lib/udev/rules.d')
|
||||||
|
systemddir = join_paths(prefix, 'lib/systemd')
|
||||||
|
systemdsystemdir = join_paths(systemddir, 'system')
|
||||||
|
|
||||||
if datadir.startswith('/')
|
if datadir.startswith('/')
|
||||||
full_datadir = datadir
|
full_datadir = datadir
|
||||||
|
Reference in New Issue
Block a user