/[smecontribs]/rpms/smeserver-unifi/contribs10/smeserver-unifi-5.6.30-sme10.patch
ViewVC logotype

Diff of /rpms/smeserver-unifi/contribs10/smeserver-unifi-5.6.30-sme10.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by jpp, Thu Aug 4 02:24:25 2022 UTC Revision 1.2 by jpp, Thu Aug 4 02:36:31 2022 UTC
# Line 1  Line 1 
1  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/createlinks smeserver-unifi-5.6.30/createlinks  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/createlinks smeserver-unifi-5.6.30/createlinks
2  --- smeserver-unifi-5.6.30.old/createlinks      2022-08-03 21:49:45.091000000 -0400  --- smeserver-unifi-5.6.30.old/createlinks      2018-03-09 02:15:53.000000000 -0500
3  +++ smeserver-unifi-5.6.30/createlinks  2018-03-09 02:15:53.000000000 -0500  +++ smeserver-unifi-5.6.30/createlinks  2022-08-03 21:49:45.091000000 -0400
4  @@ -3,7 +3,7 @@  @@ -3,7 +3,7 @@
5   use esmith::Build::CreateLinks qw(:all);   use esmith::Build::CreateLinks qw(:all);
6    
7    
8  -#service_link_enhanced("unifi", "S85", "7");  -service_link_enhanced("unifi", "S85", "7");
9  +service_link_enhanced("unifi", "S85", "7");  +#service_link_enhanced("unifi", "S85", "7");
10    
11    
12   foreach $event (qw(remoteaccess-update))   foreach $event (qw(remoteaccess-update))
13  @@ -17,28 +17,13 @@  @@ -17,13 +17,28 @@
14   }   }
15    
16    
17  -my $pkg= "smeserver-unifi";  -# add link to
18  -my $event = "${pkg}-update";  +my $pkg= "smeserver-unifi";
19  +# add link to  +my $event = "${pkg}-update";
20    
21  -event_actions($event, qw(  +event_actions($event, qw(
22  -   upgrade_unifi_controller.sh 20  +   upgrade_unifi_controller.sh 20
23  -   systemd-default 88  +   systemd-default 88
24  -   systemd-reload  89  +   systemd-reload  89
25  -));  +));
26  -  +
27  -#event_templates($event, qw(  +#event_templates($event, qw(
28  -#/etc/httpd/conf/httpd.conf  +#/etc/httpd/conf/httpd.conf
29  -#));  +#));
30  -  +
31  -event_services($event, qw(  +event_services($event, qw(
32  -    unifi restart  +    unifi restart
33  -));  +));
34  -  +
35  -use esmith::Build::Backup qw(:all);  +use esmith::Build::Backup qw(:all);
36  -backup_includes($pkg, qw(  +backup_includes($pkg, qw(
37  -/opt/Unifi  +/opt/Unifi
38  -/opt/UniFi_bak  +/opt/UniFi_bak
39  -));  +));
40    
41  +#foreach $file (  -#foreach $file (
42  +#    qw(/var/lib/denyhosts/allowed-hosts /etc/hosts.allow /etc/denyhosts.conf))  -#    qw(/var/lib/denyhosts/allowed-hosts /etc/hosts.allow /etc/denyhosts.conf))
43  +#{  -#{
44  +#    templates2events($file, qw(bootstrap-console-save conf-denyhosts));  -#    templates2events($file, qw(bootstrap-console-save conf-denyhosts));
45  +#}  -#}
46    
47   exit 0;   exit 0;
48  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/TCPPort smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/TCPPort  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/TCPPort smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/TCPPort
49  --- smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/TCPPort 1969-12-31 19:00:00.000000000 -0500  --- smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/TCPPort 2018-03-09 00:22:01.000000000 -0500
50  +++ smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/TCPPort     2018-03-09 00:22:01.000000000 -0500  +++ smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/TCPPort     1969-12-31 19:00:00.000000000 -0500
 @@ -0,0 +1 @@  
 +8080,8443,8880,8843  
 diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/TCPPorts smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/TCPPorts  
 --- smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/TCPPorts        2022-08-03 22:13:26.349000000 -0400  
 +++ smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/TCPPorts    1969-12-31 19:00:00.000000000 -0500  
51  @@ -1 +0,0 @@  @@ -1 +0,0 @@
52  -8080,8443,8880,8843  -8080,8443,8880,8843
53    diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/TCPPorts smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/TCPPorts
54    --- smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/TCPPorts        1969-12-31 19:00:00.000000000 -0500
55    +++ smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/TCPPorts    2022-08-03 22:13:26.349000000 -0400
56    @@ -0,0 +1 @@
57    +8080,8443,8880,8843
58  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/UDPPorts smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/UDPPorts  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/UDPPorts smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/UDPPorts
59  --- smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/UDPPorts        2022-08-03 22:06:10.159000000 -0400  --- smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/defaults/unifi/UDPPorts        1969-12-31 19:00:00.000000000 -0500
60  +++ smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/UDPPorts    1969-12-31 19:00:00.000000000 -0500  +++ smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/defaults/unifi/UDPPorts    2022-08-03 22:06:10.159000000 -0400
61  @@ -1 +0,0 @@  @@ -0,0 +1 @@
62  -3478,10001  +3478,10001
63  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/force/unifi/access smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/force/unifi/access  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/force/unifi/access smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/force/unifi/access
64  --- smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/force/unifi/access     2022-08-03 22:05:07.504000000 -0400  --- smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/force/unifi/access     1969-12-31 19:00:00.000000000 -0500
65  +++ smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/force/unifi/access 1969-12-31 19:00:00.000000000 -0500  +++ smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/force/unifi/access 2022-08-03 22:05:07.504000000 -0400
66  @@ -1 +0,0 @@  @@ -0,0 +1 @@
67  -private  +private
68  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/migrate/unifi smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/migrate/unifi  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/migrate/unifi smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/migrate/unifi
69  --- smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/migrate/unifi  2022-08-03 22:18:07.024000000 -0400  --- smeserver-unifi-5.6.30.old/root/etc/e-smith/db/configuration/migrate/unifi  1969-12-31 19:00:00.000000000 -0500
70  +++ smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/migrate/unifi      1969-12-31 19:00:00.000000000 -0500  +++ smeserver-unifi-5.6.30/root/etc/e-smith/db/configuration/migrate/unifi      2022-08-03 22:18:07.024000000 -0400
71  @@ -1,6 +0,0 @@  @@ -0,0 +1,6 @@
72  -{  +{
73  -  +
74  -        my $unifi = $DB->get('unifi') || $DB->new_record("unifi",{type=>'service'});  +        my $unifi = $DB->get('unifi') || $DB->new_record("unifi",{type=>'service'});
75  -       $unifi->delete_prop('TCPPort') if ( defined( $unifi->prop('TCPPort') ) and $unifi->prop('TCPPort') eq "8080,8443,8880,8843");  +       $unifi->delete_prop('TCPPort') if ( defined( $unifi->prop('TCPPort') ) and $unifi->prop('TCPPort') eq "8080,8443,8880,8843");
76  -  +
77  -}  +}
78  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/templates/usr/bin/hook-script.sh/30unifi smeserver-unifi-5.6.30/root/etc/e-smith/templates/usr/bin/hook-script.sh/30unifi  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/etc/e-smith/templates/usr/bin/hook-script.sh/30unifi smeserver-unifi-5.6.30/root/etc/e-smith/templates/usr/bin/hook-script.sh/30unifi
79  --- smeserver-unifi-5.6.30.old/root/etc/e-smith/templates/usr/bin/hook-script.sh/30unifi        2022-08-03 22:03:07.459000000 -0400  --- smeserver-unifi-5.6.30.old/root/etc/e-smith/templates/usr/bin/hook-script.sh/30unifi        1969-12-31 19:00:00.000000000 -0500
80  +++ smeserver-unifi-5.6.30/root/etc/e-smith/templates/usr/bin/hook-script.sh/30unifi    1969-12-31 19:00:00.000000000 -0500  +++ smeserver-unifi-5.6.30/root/etc/e-smith/templates/usr/bin/hook-script.sh/30unifi    2022-08-03 22:03:07.459000000 -0400
81  @@ -1,26 +0,0 @@  @@ -0,0 +1,26 @@
82  -if [ $1 = "deploy_cert" ]; then  +if [ $1 = "deploy_cert" ]; then
83  -  # and now deploy our LE cert to Unifi controller !  +  # and now deploy our LE cert to Unifi controller !
84  -{  # in case we rely on scl again  +{  # in case we rely on scl again
85  -  #. /opt/rh/rh-mongodb34/service-environment  +  #. /opt/rh/rh-mongodb34/service-environment
86  -  #. scl_source enable \$RH_MONGODB34_SCLS_ENABLED  +  #. scl_source enable \$RH_MONGODB34_SCLS_ENABLED
87  -}  +}
88  -  # To automatically detect DOMAIN (thanks to @SprockTech):  +  # To automatically detect DOMAIN (thanks to @SprockTech):
89  -  DOMAIN=$(mongo --quiet --port 27117 --eval 'db.getSiblingDB("ace").setting.find(\{"key": "super_identity"\}).forEach(function(document)\{ print(document.hostname) \})')  +  DOMAIN=$(mongo --quiet --port 27117 --eval 'db.getSiblingDB("ace").setting.find(\{"key": "super_identity"\}).forEach(function(document)\{ print(document.hostname) \})')
90  -    +  
91  -  # Backup previous keystore  +  # Backup previous keystore
92  -  cp /opt/UniFi/data/keystore  /opt/UniFi/data/keystore.backup.$(date +%F_%R)  +  cp /opt/UniFi/data/keystore  /opt/UniFi/data/keystore.backup.$(date +%F_%R)
93  -  +
94  -  # Convert cert to PKCS12 format  +  # Convert cert to PKCS12 format
95  -  # Ignore warnings  +  # Ignore warnings
96  -  #openssl pkcs12 -export -inkey /etc/letsencrypt/live/${DOMAIN}/privkey.pem -in /etc/letsencrypt/live/${DOMAIN}/fullchain.pem -out /etc/letsencrypt/live/${DOMAIN}/fullchain.p12 -name unifi -password pass:unifi  +  #openssl pkcs12 -export -inkey /etc/letsencrypt/live/${DOMAIN}/privkey.pem -in /etc/letsencrypt/live/${DOMAIN}/fullchain.pem -out /etc/letsencrypt/live/${DOMAIN}/fullchain.p12 -name unifi -password pass:unifi
97  -  openssl pkcs12 -export -inkey `config getprop modSSL key` -in `config getprop modSSL crt` -out /opt/UniFi/data/fullchain.p12 -name unifi -password pass:unifi 2>/dev/null  +  openssl pkcs12 -export -inkey `config getprop modSSL key` -in `config getprop modSSL crt` -out /opt/UniFi/data/fullchain.p12 -name unifi -password pass:unifi 2>/dev/null
98  -    +  
99  -  # Install certificate  +  # Install certificate
100  -  # Ignore warnings  +  # Ignore warnings
101  -  #keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore /var/lib/unifi/keystore -srckeystore /etc/letsencrypt/live/${DOMAIN}/fullchain.p12 -srcstoretype PKCS12 -srcstorepass unifi -alias unifi -noprompt  +  #keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore /var/lib/unifi/keystore -srckeystore /etc/letsencrypt/live/${DOMAIN}/fullchain.p12 -srcstoretype PKCS12 -srcstorepass unifi -alias unifi -noprompt
102  -  keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore  /opt/UniFi/data/keystore -srckeystore /opt/UniFi/data/fullchain.p12 -srcstoretype PKCS12 -srcstorepass unifi -alias unifi -noprompt  +  keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore  /opt/UniFi/data/keystore -srckeystore /opt/UniFi/data/fullchain.p12 -srcstoretype PKCS12 -srcstorepass unifi -alias unifi -noprompt
103  -  +
104  -  #Restart UniFi controller  +  #Restart UniFi controller
105  -  /usr/bin/systemctl restart unifi.service  +  /usr/bin/systemctl restart unifi.service
106  -fi  +fi
107  -  +
108  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/usr/lib/systemd/system/unifi.service smeserver-unifi-5.6.30/root/usr/lib/systemd/system/unifi.service  diff -Nur --no-dereference smeserver-unifi-5.6.30.old/root/usr/lib/systemd/system/unifi.service smeserver-unifi-5.6.30/root/usr/lib/systemd/system/unifi.service
109  --- smeserver-unifi-5.6.30.old/root/usr/lib/systemd/system/unifi.service        2022-08-03 21:55:45.138000000 -0400  --- smeserver-unifi-5.6.30.old/root/usr/lib/systemd/system/unifi.service        1969-12-31 19:00:00.000000000 -0500
110  +++ smeserver-unifi-5.6.30/root/usr/lib/systemd/system/unifi.service    1969-12-31 19:00:00.000000000 -0500  +++ smeserver-unifi-5.6.30/root/usr/lib/systemd/system/unifi.service    2022-08-03 21:55:45.138000000 -0400
111  @@ -1,20 +0,0 @@  @@ -0,0 +1,20 @@
112  -# UniFi Controller systemd Service File  +# UniFi Controller systemd Service File
113  -# by Steve Jenkins  +# by Steve Jenkins
114  -# Last updated January 8, 2017  +# Last updated January 8, 2017
115  -# adapted for Koozali SME Server 10  +# adapted for Koozali SME Server 10
116  -[Unit]  +[Unit]
117  -Description=Ubiquiti UniFi Controller  +Description=Ubiquiti UniFi Controller
118  -After=syslog.target network.target  +After=syslog.target network.target
119  -  +
120  -[Service]  +[Service]
121  -ExecStartPre=-/sbin/e-smith/service-status unifi  +ExecStartPre=-/sbin/e-smith/service-status unifi
122  -ExecStart=/usr/bin/java -Xmx1024M -jar /opt/UniFi/lib/ace.jar start  +ExecStart=/usr/bin/java -Xmx1024M -jar /opt/UniFi/lib/ace.jar start
123  -ExecStop=/usr/bin/java -jar /opt/UniFi/lib/ace.jar stop  +ExecStop=/usr/bin/java -jar /opt/UniFi/lib/ace.jar stop
124  -Type=simple  +Type=simple
125  -User=ubnt  +User=ubnt
126  -WorkingDirectory=/opt/UniFi  +WorkingDirectory=/opt/UniFi
127  -SuccessExitStatus=143  +SuccessExitStatus=143
128  -  +
129  -[Install]  +[Install]
130  -WantedBy=multi-user.target  +WantedBy=multi-user.target
131  -WantedBy=sme-server.target  +WantedBy=sme-server.target


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed