BLUE
PHP 7.4.33
Path:
//usr/share/memcached/scripts
Run
Logout
Edit File
Size: 1.39 KB
Close
//usr/share/memcached/scripts/systemd-memcached-wrapper
Text
Base64
#!/usr/bin/perl -w # systemd-memcached-wrapper # 2014 - Christos Trochalakis <yatiohi@idepolis.gr> # # Heavily based on start-memcached script by Jay Bonci # <jaybonci@debian.org> # # This script handles the parsing of the /etc/memcached.conf file # and was originally created for the Debian distribution. # Anyone may use this little script under the same terms as # memcached itself. use strict; if($> != 0 and $< != 0) { print STDERR "Only root wants to run systemd-memcached-wrapper.\n"; exit; } my $params; my $etchandle; my $etcfile = "/etc/memcached.conf"; # This script assumes that memcached is located at /usr/bin/memcached my $memcached = "/usr/bin/memcached"; if (scalar(@ARGV) == 1) { $etcfile = shift(@ARGV); } # systemd capture stdout by default my $ignore_directives = ("logfile"); if(open $etchandle, $etcfile) { foreach my $line (<$etchandle>) { $line ||= ""; $line =~ s/(?<!\\)\#[^\#]*//g; $line =~ s/\s+$//g; $line =~ s/^\s+//g; next unless $line; next if $line =~ /^\-[dh]/; if($line =~ /^[^\-]/) { my ($directive, $arg) = $line =~ /^(.*?)\s+(.*)/; next if(grep $directive, $ignore_directives); } push @$params, $line; } }else{ $params = []; } push @$params, "-u root" unless(grep "-u", @$params); $params = join " ", @$params; exec "$memcached $params"; exit(0);
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
damemtop
15.52 KB
lrwxr-xr-x
2023-11-01 14:19:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
damemtop.yaml
294 B
lrw-r--r--
2023-11-01 14:19:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
memcached-tool
6.05 KB
lrwxr-xr-x
2023-11-01 14:19:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
start-memcached
2.71 KB
lrwxr-xr-x
2023-11-01 14:19:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
systemd-memcached-wrapper
1.39 KB
lrwxr-xr-x
2023-11-01 14:19:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).