This commit is contained in:
aynic.os 2021-05-12 19:00:14 +02:00
parent 2dfa0ee7d2
commit 785f715830
2 changed files with 26 additions and 18 deletions

View File

@ -40,6 +40,10 @@ i_should_install() {
[[ ! -f ~/.zen/secret.june ]]
}
iso_config() {
~/.zen/astrXbian/ISOconfig.sh
}
import_astrXbian() {
mkdir -p ~/.zen
cd ~/.zen
@ -49,3 +53,12 @@ import_astrXbian() {
import_kodi() {
cp -Rf ~/.zen/astrXbian/.install/.kodi ~/
}
prepare_next_boot() {
## Rpi Xbian install.
cat /etc/rc.local | grep -Ev "exit 0" > /tmp/new.rc.local ## REMOVE "exit 0"
# PREPARE NEXT BOOT - Network config - NEXTBOOT - ISOConfig - NEXTBOOT - OK
echo "su - xbian -c '~/.zen/astrXbian/FirstBOOT.sh'" >> /tmp/new.rc.local
echo "exit 0" >> /tmp/new.rc.local
sudo cp -f /tmp/new.rc.local /etc/rc.local
}

View File

@ -39,12 +39,12 @@ i_am_xbian && sudo sed -i "s/auth.log/faillog/g" /etc/fail2ban/paths-common.conf
# NODE activates fail2ban IN zen/ipfs_SWARM_refresh.sh
### MODIFIYING /etc/sudoers ###
[[ "$USER" == "xbian" ]] && echo "xbian ALL=(ALL) NOPASSWD:ALL" | (sudo su -c 'EDITOR="tee" visudo -f /etc/sudoers.d/astroport')
i_am_xbian && echo "xbian ALL=(ALL) NOPASSWD:ALL" | (sudo su -c 'EDITOR="tee" visudo -f /etc/sudoers.d/astroport')
# PERSONNAL DEFCON LEVEL
# cp ~/.zen/astrXbian/DEFCON ~/.zen/
if [[ "$USER" == "xbian" ]]
if i_am_xbian
then
echo "enabling ipfs initV service autostart"
cd /etc/rc2.d && sudo ln -s ../init.d/ipfs S02ipfs
@ -67,25 +67,20 @@ mkdir -p ~/astroport/film
mkdir -p ~/astroport/serie
mkdir -p ~/astroport/anime
if [[ "$USER" != "xbian" ]]
if ! i_am_xbian
then
## Desktop install
echo "INITIALISATIOn Astroport/KODI"
echo "Appuyez sur la touche ENTREE pour créer votre nouvelle identité"
echo "sinon interrompez ici l'installation pour copier la restauration d'une sauvegarde"
read
~/.zen/astrXbian/ISOconfig.sh
## Desktop install
echo "INITIALISATIOn Astroport/KODI"
echo "Appuyez sur la touche ENTREE pour créer votre nouvelle identité"
echo "sinon interrompez ici l'installation pour copier la restauration d'une sauvegarde"
read
iso_config
else
## Rpi Xbian install.
cat /etc/rc.local | grep -Ev "exit 0" > /tmp/new.rc.local ## REMOVE "exit 0"
# PREPARE NEXT BOOT - Network config - NEXTBOOT - ISOConfig - NEXTBOOT - OK
echo "su - xbian -c '~/.zen/astrXbian/FirstBOOT.sh'" >> /tmp/new.rc.local
echo "exit 0" >> /tmp/new.rc.local
sudo cp -f /tmp/new.rc.local /etc/rc.local
prepare_next_boot
echo "STOP!! Redémarrer Xbian pour continuer la configuration de votre station Astroport/KODI"
echo "Faites une ISO : sudo xbian-config"
exit 0
echo "STOP!! Redémarrer Xbian pour continuer la configuration de votre station Astroport/KODI"
echo "Faites une ISO : sudo xbian-config"
exit 0
fi
# MAIN # -f ~/.zen/secret.june (ISOConfig déjà lancé) ##