rsyslog init script

Forum Forums Official Releases antiX-23 “Arditi del Popolo rsyslog init script

  • This topic has 14 replies, 10 voices, and was last updated Apr 16-8:21 pm by blur13.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #116235
    Member
    blur13

      Hi!

      I tried installing rsyslog on antiX 23 full sysvinit, and I dont think it includes an actual init script?

      This has been discussed before

      https://www.antixforum.com/forums/topic/rsyslog-problem/

      and the solution worked in antiX 22, but not in 23.

      However the “workaround” mentioned in that thread does work, ie downloading init script manually from the mx forum.

      #116244
      Member
      abc-nix

        You are right. Debian removed the init script. anticapitalista could revert these changes or we could send the changes ourself to the antiX source for rsyslog.

        #116270
        Forum Admin
        dolphin_oracle

          on MX we provide a seperate package for the rsyslogd init script

          http://mxrepo.com/mx/repo/pool/main/r/rsyslogd-sysvinit-compat/

          #116279
          Member
          wildstar84

            Not sure why you don’t have one (I do: /etc/init.d/rsyslog, symlinked from /etc/rc5.d/S02rsyslog). Here it is, if you need it:

            #! /bin/sh
            ### BEGIN INIT INFO
            # Provides:          rsyslog
            # Required-Start:    $remote_fs $time
            # Required-Stop:     umountnfs $time
            # X-Stop-After:      sendsigs
            # Default-Start:     2 3 4 5
            # Default-Stop:      0 1 6
            # Short-Description: enhanced syslogd
            # Description:       Rsyslog is an enhanced multi-threaded syslogd.
            #                    It is quite compatible to stock sysklogd and can be 
            #                    used as a drop-in replacement.
            ### END INIT INFO
            #
            # Author: Michael Biebl <biebl@debian.org>
            #
            # PATH should only include /usr/* if it runs after the mountnfs.sh script
            PATH=/sbin:/usr/sbin:/bin:/usr/bin
            DESC="enhanced syslogd"
            NAME=rsyslog
            RSYSLOGD=rsyslogd
            DAEMON=/usr/sbin/rsyslogd
            PIDFILE=/run/rsyslogd.pid
            SCRIPTNAME=/etc/init.d/$NAME
            # Exit if the package is not installed
            [ -x "$DAEMON" ] || exit 0
            # Read configuration variable file if it is present
            [ -r /etc/default/$NAME ] && . /etc/default/$NAME
            # Define LSB log_* functions.
            . /lib/lsb/init-functions
            do_start()
            {
            	# Return
            	#   0 if daemon has been started
            	#   1 if daemon was already running
            	#   other if daemon could not be started or a failure occured
            	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $RSYSLOGD_OPTIONS
            }
            do_stop()
            {
            	# Return
            	#   0 if daemon has been stopped
            	#   1 if daemon was already stopped
            	#   other if daemon could not be stopped or a failure occurred
            	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --exec $DAEMON
            }
            #
            # Tell rsyslogd to close all open files
            #
            do_rotate() {
            	start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE --exec $DAEMON
            }
            create_xconsole() {
            	XCONSOLE=/dev/xconsole
            	if [ "$(uname -s)" != "Linux" ]; then
            		XCONSOLE=/run/xconsole
            		ln -sf $XCONSOLE /dev/xconsole
            	fi
            	if [ ! -e $XCONSOLE ]; then
            		mknod -m 640 $XCONSOLE p
            		chown root:adm $XCONSOLE
            		[ -x /sbin/restorecon ] && /sbin/restorecon $XCONSOLE
            	fi
            }
            sendsigs_omit() {
            	OMITDIR=/run/sendsigs.omit.d
            	mkdir -p $OMITDIR
            	ln -sf $PIDFILE $OMITDIR/rsyslog
            }
            case "$1" in
              start)
            	log_daemon_msg "Starting $DESC" "$RSYSLOGD"
            	create_xconsole
            	do_start
            	case "$?" in
            		0) sendsigs_omit
            		   log_end_msg 0 ;;
            		1) log_progress_msg "already started"
            		   log_end_msg 0 ;;
            		*) log_end_msg 1 ;;
            	esac
            	;;
              stop)
            	log_daemon_msg "Stopping $DESC" "$RSYSLOGD"
            	do_stop
            	case "$?" in
            		0) log_end_msg 0 ;;
            		1) log_progress_msg "already stopped"
            		   log_end_msg 0 ;;
            		*) log_end_msg 1 ;;
            	esac
            	;;
              rotate)
            	log_daemon_msg "Closing open files" "$RSYSLOGD"
            	do_rotate
            	log_end_msg $?
            	;;
              restart|force-reload)
            	$0 stop
            	$0 start
            	;;
              try-restart)
            	$0 status >/dev/null 2>&1 && $0 restart
            	;;
              status)
            	status_of_proc -p $PIDFILE $DAEMON $RSYSLOGD && exit 0 || exit $?
            	;;
              *)
            	echo "Usage: $SCRIPTNAME {start|stop|rotate|restart|force-reload|try-restart|status}" >&2
            	exit 3
            	;;
            esac
            :
            

            Regards,

            Jim

            #134206
            Member
            entropyagent

              It seems I might need an rsyslog init for my antiX 23.1 sysV 64bit Base install, so fail2ban can monitor openssh-server. What is the canonical method recommended by veteran Unix admins? I don’t want my antics to meet with disapproval.

              I’m also thinking about a few months into the future, when I try to remember what I did. Would the safest and most logical place for the MX .deb (if that’s recommended) be the /var/cache/apt folder? Or is this only for active-repo debs?

              The init from my devuan daedalus install seems about the same as the @wildstar84 (thanks) sample above – is just copypasta-ing it also considered respectable? I can probably also manage to match up the ownership and permissions.

              #134209
              Forum Admin
              rokytnji

                I make a folder in my /home/user name section called test to keep up with all the changes going on lately. I fill it with zip, tar, .debs , text.
                Whatever aint stock goes in there.

                
                $ ls
                bin  Desktop  Documents  Downloads  Live-usb-storage  Music  Pictures  Test  Videos 

                Sometimes I drive a crooked road to get my mind straight.
                I don't suffer from insanity. I enjoy every minute off it.
                Motorcycle racing is rocket science.

                Linux Registered User # 475019
                How to Search for AntiX solutions to your problems

                #134272
                Member
                entropyagent

                  OK, thanks, it seems there is little insistence on keeping it somewhere “safe” in a root-guarded
                  folder.

                  #134283
                  Moderator
                  Brian Masinick

                    @rokytnji

                    I see by
                    “$ ls
                    bin”

                    that you also do as I do, and take handy executable programs and scripts and place them in your own private bin directory. I’ve been doing that for more years than I can remember.

                    --
                    Brian Masinick

                    #136441
                    Member
                    seriousness

                      It seems I might need an rsyslog init for my antiX 23.1 sysV 64bit Base install

                      Same here on Full. I just installed rsyslog 8.2302.0-1.0nosystemd1 and it does not provide the init script.

                      #136442
                      Member
                      seriousness

                        Just to prevent people from searching around:

                        extract the attached file, copy it to /etc/init.d and make sure it is executable.

                        Then run
                        sudo update-rc.d rsyslog defaults
                        Start the daemon with
                        sudo service rsyslog start
                        or reboot.

                        • This reply was modified 2 months, 2 weeks ago by seriousness.
                        #136485
                        Member
                        tamix

                          I am joining the topic. Beginning of January, I signaled there to @anticapitalista that there was a completeness issue of rsyslog availbable in the antix repos (for antiX-23). I got no reply and I did not search further. I exclusively use antiX LiveUSB ISOs in my computer.

                          I’ve seen some users have been discussing this matter since Sep. 2023. The scope of rsyslog is certainly very large, I have been using it with ppp/pppd until that date. Or even until now on antiX-21.

                          My question is double.

                          1. Does antiX plan to integrate again rsyslog in its next full versions? I still have no idea but I do need the software. In case it cannot be shipped, then…

                          2. I suggest that the GNU/Debian package inetutils-syslogd which fills approximately the same service is integrated in a next version. Its a light package. I install it offline on antiX-23 every time I start the machine. That’s just my need at the moment.

                          Some users may have specific reasons to opt for rsyslog.

                          • This reply was modified 2 months, 2 weeks ago by tamix.

                          They call me anartista.
                          « If the users don't control the program, the program controls the users. » - rms

                          #136504
                          Member
                          Robin

                            I install it offline on antiX-23 every time I start the machine. That’s just my need at the moment.

                            Why don’t you run a live remaster from the control centre once you have installed all the additional software you need on a live session immediately after startup? That’s the antiX/MX way to have all things you personally need being integrated into your working copy of the default ISOs (or removed from them, e.g. firefox or libreoffice localisation packages to languages you don’t need). That simple step will save you from repeating this install again and again on each reboot. If you decide for personal remaster and include the home into it, you will even have all configs present (so make sure these match your needs before running the remaster). You may repeat a remaster later to change things again and again, if this is needed. If you want things to change regularly rather than having a static setup, you may want to check out live persistence (root and/or home persistence).

                            No need to constantly reinstall all the stuff you want to have present, again and again, as you seem to handle this currently.

                            Windows is like a submarine. Open a window and serious problems will start.

                            #136546
                            Member
                            tamix

                              @Robin thank you for your pertinent remarks. You are probably talking the voice of reason. Above all: thanks for your numerous contributions to the antiX world, which are very much appreciated. You are an active part of the backbone!

                              For long time I have been used to giving the priority to mottos such as “no..no..no..” rather than “plus..plus..plus”. For instance, as we talk computers“: no hd, no upgrade, no remaster, no gui, no online (the list is longer). If you prefer it’s somehow my (unixian) way of life, my digital philosophy. Well in my case, I also admit it may be a matter of laziness, of negligence, who knows 🙂

                              To me the native LiveUSB isos shipped by antiX are the priority number one. The ideal thing would be to start with a Core version with its minimal environment instead of aFull, but my current capacities are not boundless due to age. So it’s a manner to “start from scratch” every day: I definitely do not know in advance which final configuration my computer will have in the working day or in the evening (except when I have to work hard on a given subject). I have so many alternatives to be activated, even when I am offline.

                              The problem with components such as rsyslog or syslog is that they are vital in all forms of a computer session: I just cannot understand why it was removed from antiX-23: it is essential for monitoring a session and much more though. There must be a reason but we all just don’t know why. So installing inetutils-syslogd on the fly takes no longer than 10 seconds: sure I will not die…

                              See you.

                              • This reply was modified 2 months, 1 week ago by tamix.

                              They call me anartista.
                              « If the users don't control the program, the program controls the users. » - rms

                              #139653
                              Member
                              seriousness

                                I just noticed that rsyslog 8.2302.0-1.0nosystemd2 provides the init script – thanks anticapitalista!

                                #139690
                                Member
                                blur13

                                  Great news! Thanks for letting us know.

                                Viewing 15 posts - 1 through 15 (of 15 total)
                                • You must be logged in to reply to this topic.