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 ]] [[ ! -f ~/.zen/secret.june ]]
} }
iso_config() {
~/.zen/astrXbian/ISOconfig.sh
}
import_astrXbian() { import_astrXbian() {
mkdir -p ~/.zen mkdir -p ~/.zen
cd ~/.zen cd ~/.zen
@ -49,3 +53,12 @@ import_astrXbian() {
import_kodi() { import_kodi() {
cp -Rf ~/.zen/astrXbian/.install/.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 # NODE activates fail2ban IN zen/ipfs_SWARM_refresh.sh
### MODIFIYING /etc/sudoers ### ### 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 # PERSONNAL DEFCON LEVEL
# cp ~/.zen/astrXbian/DEFCON ~/.zen/ # cp ~/.zen/astrXbian/DEFCON ~/.zen/
if [[ "$USER" == "xbian" ]] if i_am_xbian
then then
echo "enabling ipfs initV service autostart" echo "enabling ipfs initV service autostart"
cd /etc/rc2.d && sudo ln -s ../init.d/ipfs S02ipfs 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/serie
mkdir -p ~/astroport/anime mkdir -p ~/astroport/anime
if [[ "$USER" != "xbian" ]] if ! i_am_xbian
then then
## Desktop install ## Desktop install
echo "INITIALISATIOn Astroport/KODI" echo "INITIALISATIOn Astroport/KODI"
echo "Appuyez sur la touche ENTREE pour créer votre nouvelle identité" 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" echo "sinon interrompez ici l'installation pour copier la restauration d'une sauvegarde"
read read
~/.zen/astrXbian/ISOconfig.sh iso_config
else else
## Rpi Xbian install. prepare_next_boot
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
echo "STOP!! Redémarrer Xbian pour continuer la configuration de votre station Astroport/KODI" echo "STOP!! Redémarrer Xbian pour continuer la configuration de votre station Astroport/KODI"
echo "Faites une ISO : sudo xbian-config" echo "Faites une ISO : sudo xbian-config"
exit 0 exit 0
fi fi
# MAIN # -f ~/.zen/secret.june (ISOConfig déjà lancé) ## # MAIN # -f ~/.zen/secret.june (ISOConfig déjà lancé) ##