~pvigo/+junk/linkat-perfil-radio-16.04

« back to all changes in this revision

Viewing changes to linkat-perfil-radio/configura_perfil_radio.sh

  • Committer: Pablo Vigo
  • Date: 2018-05-07 11:33:44 UTC
  • Revision ID: pvigo@xtec.cat-20180507113344-mfy94dmygnn4t5nd
Fixed radio scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
      MAX_LISTENERS=$(zenity --entry \
81
81
--title="Nombre màxim d'oients" \
82
82
--text="Establiu el nombre màxim d'oients simultanis \nper a cada canal del servidor Icecast:" \
83
 
--entry-text "20")
 
83
--entry-text "100")
84
84
      if [ "$?" = "1" ]; then
85
85
         exit 0
86
86
      fi
95
95
   chown icecast2:icecast /etc/icecast2/icecast.xml
96
96
   chmod 660 /etc/icecast2/icecast.xml
97
97
   rm $TEMP_FILE
98
 
   if [ -z $(grep ENABLE=false /etc/default/icecast2) ]; then
 
98
   if [ -n "$(grep ENABLE=false /etc/default/icecast2)" ]; then
99
99
      sed -i 's/ENABLE=false/ENABLE=true/g' /etc/default/icecast2
100
100
   fi
101
101
   systemctl restart icecast2
197
197
--text="Seleccioneu la veu per a les locucions\nhoràries i meteorològiques." \
198
198
--column="Veu" \
199
199
Pau \
200
 
Ona)
 
200
Ona \
 
201
Personalitzada)
201
202
      if [ "$?" = "1" ]; then
202
203
         exit 0
203
204
      fi
207
208
   fi
208
209
   if [ $VOICE == "Pau" ]; then
209
210
      ln -s /usr/share/radit/Radit-1.0-Lucid/Hth.home /usr/share/radit/Radit-1.0-Lucid/Hth
 
211
   elif [ $VOICE == "Ona" ]; then
 
212
      ln -s /usr/share/radit/Radit-1.0-Lucid/Hth.dona /usr/share/radit/Radit-1.0-Lucid/Hth
210
213
   else
211
 
      ln -s /usr/share/radit/Radit-1.0-Lucid/Hth.dona /usr/share/radit/Radit-1.0-Lucid/Hth
 
214
      CUSTOM_VOICE=$(zenity --file-selection --directory --filename=/home-local/radio/Multimèdia)
 
215
      if [ -n "$CUSTOM_VOICE" ]; then
 
216
         ln -s "$CUSTOM_VOICE" /usr/share/radit/Radit-1.0-Lucid/Hth
 
217
      else
 
218
         ln -s /usr/share/radit/Radit-1.0-Lucid/Hth.home /usr/share/radit/Radit-1.0-Lucid/Hth
 
219
      fi
212
220
   fi
213
221
   cp /usr/share/linkat/linkat-perfil-radio/template_butt $HOME_RADIO/.buttrc
214
222
   sed -i "s/_PASSWORD_/$PASSWORD/g;s/_HOSTNAME_/$HOST_ICECAST/g;s/_IP-ICECAST2_/$IP_ICECAST2/g;s/_USER_ICECAST2_/$USER_ICECAST2/g;s/_MOUNT_ICECAST2_/$MOUNT_ICECAST2/g;s/_PORT_ICECAST2_/$PORT_ICECAST2/g" $HOME_RADIO/.buttrc