Commit f3204490 authored by Rafael Monnerat's avatar Rafael Monnerat

Replace init script by slapos node boot

  It is enough to use @reboot with slapos node boot on cron for include
  approprate minimal start up.

  This can be unconventional for most distros, however it is much more
  simpler and distribution independent.
parent bc137ae9
......@@ -10,12 +10,10 @@ install: all
cd slapos; make install
mkdir -p $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/usr/sbin/
cp slapos-start $(DESTDIR)/usr/sbin/
cp slapos-test $(DESTDIR)/usr/sbin/
cp slapos-re6st-setup $(DESTDIR)/usr/sbin/
cp slapos-tweak $(DESTDIR)/usr/sbin/
cp $(DESTDIR)/opt/slapos/bin/slapos $(DESTDIR)/usr/bin/
# Open VPN configuration
mkdir -p $(DESTDIR)/etc/opt/slapos/
clean:
# cd slapos; make clean
......@@ -11,3 +11,6 @@ MAILTO=""
# Run "Check/add IPs and so on" once per hour
0 * * * * root /opt/slapos/bin/slapos node format >> /opt/slapos/log/slapos-node-format.log 2>&1
# Run "Booting" on every system start
@reboot root /opt/slapos/bin/slapos node boot >> /opt/slapos/log/slapos-node-format.log 2>&1
......@@ -89,7 +89,6 @@ cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_numb
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/template/slapos-node.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/slapos.logrotate.conf
mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/template/slapos-node.service %{buildroot}/etc/systemd/system/
mkdir -p $RPM_BUILD_ROOT/opt/slapos/log
%files
......@@ -106,10 +105,6 @@ fi
%post
echo """To generate slapos configuration run '#slapos node register'"""
if [ -f /bin/systemctl ]; then
systemctl enable slapos-node.service
systemctl start slapos-node.service
fi
%preun
if [ -f /etc/openvpn/vifib.conf ]; then
......
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