Am 15.07.2016 um 12:57 schrieb Reindl Harald:


Am 15.07.2016 um 12:43 schrieb Admin Beckspaced:

as a workaround i wrote a tiny shell script checking if dbmail-imapd is
running and if not then start a process
since upgrading to 3.2.3 no crash has been reported so far ... keeping
fingers crossed ;)
should be handeled by the init system these days

[root@mail:~]$ cat /usr/lib/systemd/system/dbmail-imapd.service
[Unit]
Description=DBMail IMAP Server
After=network.service systemd-networkd.service network-online.target
mysqld.service mysqld-dbmail.service
Before=dovecot.service

[Service]
Type=simple
ExecStart=/usr/sbin/dbmail-imapd -D
Environment="LANG=en_GB.UTF-8"
Restart=always
RestartSec=1
StartLimitBurst=100
TimeoutStopSec=5
LimitNOFILE=50000

PrivateTmp=yes
PrivateDevices=yes
CapabilityBoundingSet=CAP_DAC_OVERRIDE CAP_IPC_LOCK CAP_NET_BIND_SERVICE
CAP_SETGID CAP_SETUID
RestrictAddressFamilies=~AF_APPLETALK AF_ATMPVC AF_AX25 AF_IPX
AF_NETLINK AF_PACKET AF_X25
SystemCallArchitectures=x86-64
SystemCallFilter=~acct modify_ldt add_key adjtimex clock_adjtime
delete_module fanotify_init finit_module get_mempolicy init_module
io_destroy io_getevents iopl ioperm io_setup io_submit io_cancel kcmp
kexec_load keyctl lookup_dcookie mbind migrate_pages mount move_pages
open_by_handle_at perf_event_open pivot_root process_vm_readv
process_vm_writev ptrace remap_file_pages request_key set_mempolicy
swapoff swapon umount2 uselib vmsplice

ReadOnlyDirectories=/
ReadWriteDirectories=-/run
ReadWriteDirectories=-/tmp
ReadWriteDirectories=-/var/tmp
ReadWriteDirectories=-/var/log

InaccessibleDirectories=-/boot
InaccessibleDirectories=-/home
InaccessibleDirectories=-/media
InaccessibleDirectories=-/root
InaccessibleDirectories=-/etc/dbus-1
InaccessibleDirectories=-/etc/ssh
InaccessibleDirectories=-/run/console
InaccessibleDirectories=-/run/dbus
InaccessibleDirectories=-/run/lock
InaccessibleDirectories=-/run/mount
InaccessibleDirectories=-/run/systemd/generator
InaccessibleDirectories=-/run/systemd/system
InaccessibleDirectories=-/run/systemd/users
InaccessibleDirectories=-/run/udev
InaccessibleDirectories=-/run/user
InaccessibleDirectories=-/usr/local/scripts
InaccessibleDirectories=-/var/lib/dbus
InaccessibleDirectories=-/var/lib/dnf
InaccessibleDirectories=-/var/lib/rpm
InaccessibleDirectories=-/var/lib/systemd
InaccessibleDirectories=-/var/lib/yum
InaccessibleDirectories=-/var/spool

i see there's also a systemd folder in the 3.2.3 version:

https://github.com/pjstevns/dbmail/tree/master/systemd

and some makefiles ....

sorry ... i'm no linux expert, but could you perhaps shed some light on
creating the proper systemd service files for my OS opensuse

would really love to have that nice auto-restart feature once a dbmail
process crashes.
this is possble with using systemd service files, isn't it?

scroll up

>> Restart=always
>> RestartSec=1

your handmade units belonging below /etc/systemd/system/

thanks again ...

but my question was if i could use the makefiles in the /systemd folder to create a systemd service unit specific to my OS?

or do i need to create them myself?

_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to