Bob Mottram 9 лет назад
Родитель
Сommit
8dc999c26c
1 измененных файлов: 12 добавлений и 12 удалений
  1. 12
    12
      src/freedombone

+ 12
- 12
src/freedombone Просмотреть файл

@@ -1635,7 +1635,7 @@ function randomize_cron {
1635 1635
     sed -i "s|52 6\t|$randmin $randhr\t|g" /etc/crontab
1636 1636
     sed -i "s|\t1 \* \*|\t$randdom * *|g" /etc/crontab
1637 1637
 
1638
-    service cron restart
1638
+    systemctl restart cron
1639 1639
 
1640 1640
     echo 'randomize_cron' >> $COMPLETION_FILE
1641 1641
 }
@@ -2020,7 +2020,7 @@ function mesh_cjdns {
2020 2020
     echo '        AdvRouterAddr on;' >> /etc/radvd.conf
2021 2021
     echo '    };' >> /etc/radvd.conf
2022 2022
     echo '};' >> /etc/radvd.conf
2023
-    service radvd restart
2023
+    systemctl restart radvd
2024 2024
     if [ ! "$?" = "0" ]; then
2025 2025
         systemctl status radvd.service
2026 2026
         exit 4395
@@ -3183,7 +3183,7 @@ function create_freedns_updater {
3183 3183
 
3184 3184
     if ! grep -q "/usr/bin/dynamicdns" /etc/crontab; then
3185 3185
         echo '*/3            * *   *   *   root /usr/bin/dynamicdns' >> /etc/crontab
3186
-        service cron restart
3186
+        systemctl restart cron
3187 3187
     fi
3188 3188
 
3189 3189
     echo 'create_freedns_updater' >> $COMPLETION_FILE
@@ -3777,7 +3777,7 @@ function regenerate_ssh_keys {
3777 3777
     rm -f /etc/ssh/ssh_host_*
3778 3778
     dpkg-reconfigure openssh-server
3779 3779
     ssh_remove_small_moduli
3780
-    service ssh restart
3780
+    systemctl restart ssh
3781 3781
     echo 'regenerate_ssh_keys' >> $COMPLETION_FILE
3782 3782
 }
3783 3783
 
@@ -3836,7 +3836,7 @@ function time_synchronisation {
3836 3836
     apt-get -y remove ntpdate
3837 3837
 
3838 3838
     echo '*/15           * *   *   *   root /usr/bin/updatedate' >> /etc/crontab
3839
-    service cron restart
3839
+    systemctl restart cron
3840 3840
 
3841 3841
     echo 'time_synchronisation' >> $COMPLETION_FILE
3842 3842
 }
@@ -4691,7 +4691,7 @@ function configure_imap {
4691 4691
         rm /var/lib/dovecot/ssl-parameters.dat
4692 4692
     fi
4693 4693
 
4694
-    service dovecot restart
4694
+    systemctl restart dovecot
4695 4695
     echo 'configure_imap' >> $COMPLETION_FILE
4696 4696
 }
4697 4697
 
@@ -4773,7 +4773,7 @@ function configure_imap_client_certs {
4773 4773
     touch /etc/ssl/ssldb
4774 4774
     echo 0001 > /etc/ssl/sslserial
4775 4775
     #${PROJECT_NAME}-clientcert -u $MY_USERNAME
4776
-    service dovecot restart
4776
+    systemctl restart dovecot
4777 4777
     echo 'configure_imap_client_certs' >> $COMPLETION_FILE
4778 4778
 }
4779 4779
 
@@ -5122,7 +5122,7 @@ function encrypt_outgoing_email {
5122 5122
     # obtain your public key ID
5123 5123
     if [ ! $MY_GPG_PUBLIC_KEY_ID ]; then
5124 5124
         MY_GPG_PUBLIC_KEY_ID=$(gpg_pubkey_from_email "$MY_USERNAME" "$MY_EMAIL_ADDRESS")
5125
-        if [ ! $MY_GPG_PUBLIC_KEY_ID ]; then
5125
+        if [ ! "$MY_GPG_PUBLIC_KEY_ID" ]; then
5126 5126
             return
5127 5127
         fi
5128 5128
         if [ ${#MY_GPG_PUBLIC_KEY_ID} -lt 4 ]; then
@@ -5496,7 +5496,7 @@ function create_public_mailing_list {
5496 5496
     newaliases
5497 5497
     update-exim4.conf.template -r
5498 5498
     update-exim4.conf
5499
-    service exim4 restart
5499
+    systemctl restart exim4
5500 5500
 
5501 5501
     if ! grep -q $"$PUBLIC_MAILING_LIST mailing list" /home/$MY_USERNAME/README; then
5502 5502
         echo '' >> /home/$MY_USERNAME/README
@@ -5566,7 +5566,7 @@ function create_private_mailing_list {
5566 5566
     chown -R schleuder:schleuder /var/lib/schleuder
5567 5567
     update-exim4.conf.template -r
5568 5568
     update-exim4.conf
5569
-    service exim4 restart
5569
+    systemctl restart exim4
5570 5570
     useradd -d /var/schleuderlists -s /bin/false schleuder
5571 5571
     adduser Debian-exim schleuder
5572 5572
     usermod -a -G mail schleuder
@@ -5993,7 +5993,7 @@ function add_ddns_domain {
5993 5993
         echo "  alias $CURRENT_DDNS_DOMAIN" >> /etc/inadyn.conf
5994 5994
     fi
5995 5995
     chmod 600 /etc/inadyn.conf
5996
-    service inadyn restart
5996
+    systemctl restart inadyn
5997 5997
     systemctl daemon-reload
5998 5998
 
5999 5999
     # clear the arguments
@@ -9677,7 +9677,7 @@ function install_sip {
9677 9677
     groupadd sipwitch
9678 9678
     usermod -aG sipwitch $MY_USERNAME
9679 9679
 
9680
-    service sipwitch start
9680
+    systemctl restart sipwitch
9681 9681
 
9682 9682
     if ! grep -q $"SIP Server" /home/$MY_USERNAME/README; then
9683 9683
         echo '' >> /home/$MY_USERNAME/README