mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 03:13:17 +00:00
23 lines
641 B
Bash
Executable File
23 lines
641 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
START=80
|
|
|
|
copy_certificates() {
|
|
[ -f /certificates/key.pem ] || return
|
|
|
|
cp /certificates/*.pem /etc/ucentral/
|
|
[ -f /certificates/dev-id ] && cp /certificates/dev-id /etc/ucentral/
|
|
chown root.network /etc/ucentral/*.pem
|
|
chmod 0440 root.network /etc/ucentral/*.pem
|
|
[ -f /etc/ucentral/dev-id] && chmod 0400 /etc/ucentral/dev-id
|
|
[ -f /certificates/restrictions.json ] && cp /certificates/restrictions.json /etc/ucentral/
|
|
[ -f /certificates/sign_pubkey.pem ] && cp /certificates/sign_pubkey.pem /etc/ucentral/
|
|
exit 0
|
|
}
|
|
|
|
boot() {
|
|
[ -f /etc/ucentral/dev-id ] && return
|
|
/usr/bin/mount_certs
|
|
copy_certificates
|
|
}
|