Unverified Commit 480d64c6 authored by David Beniamine's avatar David Beniamine
Browse files

Upgrade script fix #18

parent 4da3ec1e
......@@ -16,23 +16,28 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
DIR=$(dirname $0)
DIR=$(realpath $(dirname $0))
cd /opt
apt-eole update
apt-eole install \
git \
printer-driver-splix \
hplip \
wakeonlan
if [ "$(dpkg -l | grep git)" ]
then
apt-eole update
apt-eole install \
git \
printer-driver-splix \
hplip \
wakeonlan
fi
if [ ! -e "eole-wol" ]
then
git clone https://gitecoles.grenoble.fr/grenoble/eole-wol
cd eole-wol
else
cd eole-wol
git pull
git stash
git checkout master
git pull origin master
fi
cp $DIR/*/service/*.service /etc/systemd/system/
......@@ -52,7 +57,7 @@ done
# Add registry clean to cronab
line="0 1 1 * * $DIR/registry/scripts/clean.sh > /dev/null 2>&1"
(crontab -l; echo "${line}") | crontab -
(crontab -l | grep -v "registry"; echo "${line}") | crontab -
# Copy ssh key to tftp
while [ ! -e "/root/.ssh/id_rsa.pub" ]
......
......@@ -20,16 +20,21 @@ DIR=$(dirname $0)
cd /var/www
apt-eole update
apt-eole install \
git \
xrdp
if [ "$(dpkg -l | grep git)" ]
then
apt-eole update
apt-eole install \
git \
xrdp
fi
if [ ! -e "eole-wol" ]
then
git clone https://gitecoles.grenoble.fr/grenoble/eole-wol
else
cd eole-wol
git pull
git stash
git checkout master
git pull origin master
cd -
fi
......
#!/bin/bash
git pull
`dirname $0`/do_postinstall.sh
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment