initial commit of file from CVS for e-smith-cvm-unix-local on Wed 12 Jul 08:50:15 BST 2023

This commit is contained in:
Brian Read
2023-07-12 08:50:15 +01:00
parent f95fd48ea9
commit f32087538a
17 changed files with 280 additions and 2 deletions

View File

@@ -0,0 +1 @@
localhost

View File

@@ -0,0 +1 @@
enabled

View File

@@ -0,0 +1 @@
service

View File

@@ -0,0 +1,7 @@
{
my $cvm = $DB->get_prop('cvm-unix', 'status');
return unless defined $cvm;
$DB->set_prop('cvm-unix', 'status', 'enabled') unless $cvm eq "enabled";
}

View File

@@ -0,0 +1,4 @@
#cvm
:programname, startswith, "cvm" /var/log/cvm/cvm.log
& stop

View File

@@ -0,0 +1,3 @@
enable cvm-unix.service

13
root/etc/logrotate.d/cvm Normal file
View File

@@ -0,0 +1,13 @@
/var/log/cvm/*.log {
create 640 root root
notifempty
daily
rotate 28
missingok
compress
delaycompress
postrotate
/usr/bin/systemctl restart cvm-unix
endscript
}

View File

@@ -0,0 +1,10 @@
#!/bin/sh
/sbin/e-smith/config show cvm-unix 1>/dev/null || /sbin/e-smith/config set cvm-unix service status enabled
status=$(/sbin/e-smith/config getprop cvm-unix status)
if [ "$status" != "enabled" ]
then
/sbin/e-smith/config setprop cvm-unix status disabled
fi

View File

@@ -0,0 +1,20 @@
[Unit]
Description=Credential Validation Modules
Before=sme-server.target network.target network-pre.target
[Service]
Type=simple
User=root
Group=root
Restart=always
RestartSec=.5
StartLimitInterval=0
StartLimitBurst=0
ExecStartPre=-/sbin/e-smith/systemd/cvm-unix-pre
ExecStart=/usr/bin/cvm-unix cvm-local:/var/lib/cvm/cvm-unix-local.socket
ExecStopPost=-/sbin/e-smith/db configuration setprop cvm-unix status enabled
TimeoutSec=0
[Install]
WantedBy=sme-server.target

View File

@@ -0,0 +1,2 @@
[Unit]
Wants=cvm-unix.service

0
root/var/.gitignore vendored Normal file
View File