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:
@@ -0,0 +1 @@
|
||||
localhost
|
@@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/cvm-unix/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/cvm-unix/type
Normal file
@@ -0,0 +1 @@
|
||||
service
|
7
root/etc/e-smith/db/configuration/migrate/cvm-unix
Normal file
7
root/etc/e-smith/db/configuration/migrate/cvm-unix
Normal 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";
|
||||
|
||||
}
|
||||
|
4
root/etc/e-smith/templates/etc/rsyslog.conf/32cvm
Normal file
4
root/etc/e-smith/templates/etc/rsyslog.conf/32cvm
Normal file
@@ -0,0 +1,4 @@
|
||||
#cvm
|
||||
:programname, startswith, "cvm" /var/log/cvm/cvm.log
|
||||
& stop
|
||||
|
@@ -0,0 +1,3 @@
|
||||
|
||||
enable cvm-unix.service
|
||||
|
13
root/etc/logrotate.d/cvm
Normal file
13
root/etc/logrotate.d/cvm
Normal 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
|
||||
}
|
||||
|
10
root/sbin/e-smith/systemd/cvm-unix-pre
Normal file
10
root/sbin/e-smith/systemd/cvm-unix-pre
Normal 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
|
20
root/usr/lib/systemd/system/cvm-unix.service
Normal file
20
root/usr/lib/systemd/system/cvm-unix.service
Normal 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
|
||||
|
@@ -0,0 +1,2 @@
|
||||
[Unit]
|
||||
Wants=cvm-unix.service
|
0
root/var/.gitignore
vendored
Normal file
0
root/var/.gitignore
vendored
Normal file
Reference in New Issue
Block a user