data: install systemd system service

This commit is contained in:
Arnaud Ferraris
2021-10-06 22:41:43 +02:00
parent af4d5ca1c1
commit a3d27cb3f7
3 changed files with 33 additions and 0 deletions

View 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

View File

@@ -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
)

View File

@@ -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